API methods for removing worlds and games #115

Closed
opened 2017-03-20 11:43:26 +01:00 by nik · 11 comments
nik commented 2017-03-20 11:43:26 +01:00 (Migrated from edugit.org)
No description provided.
nik commented 2017-05-09 17:01:05 +02:00 (Migrated from edugit.org)

First, add a column named enabled to Game. Add an on_update trigger, which will ensure that if a game is disabled, all worlds related to it are disabled, too (look into SQLAlchemy docs for how to add on_update triggers).

Add an API method (a method following the structure of our API methods, decorated as api_method) to World, which will delete the world and all objects related to it, but only if the world was disabled before. Also add an API method to Game, which deletes the game if it is disabled, and cascades to the delete methods of all associated worlds.

First, add a column named enabled to Game. Add an on_update trigger, which will ensure that if a game is disabled, all worlds related to it are disabled, too (look into SQLAlchemy docs for how to add on_update triggers). Add an API method (a method following the structure of our API methods, decorated as api_method) to World, which will delete the world *and all objects related to it*, but only if the world was disabled before. Also add an API method to Game, which deletes the game if it is disabled, and cascades to the delete methods of all associated worlds.
nik commented 2017-05-09 17:01:10 +02:00 (Migrated from edugit.org)

Reassigned to @eike

Reassigned to @eike
nik commented 2017-05-09 17:17:38 +02:00 (Migrated from edugit.org)

Also, in the code scanning available games, add a reverse scan that looks for objects in the game table, disabling all games that are not available anymore.

Also, in the code scanning available games, add a reverse scan that looks for objects in the game table, disabling all games that are not available anymore.
eike commented 2017-05-09 17:54:23 +02:00 (Migrated from edugit.org)

Mentioned in commit 1625ef3038

Mentioned in commit 1625ef3038b53f42a214f09cf21e8c5908740d2a
eike commented 2017-05-09 17:54:23 +02:00 (Migrated from edugit.org)

Mentioned in commit f62edf7f2c

Mentioned in commit f62edf7f2c3055d206847a658b5687d73b1101e4
eike commented 2017-05-09 18:21:53 +02:00 (Migrated from edugit.org)

Mentioned in commit 6db81d30e5

Mentioned in commit 6db81d30e5c4c651f9b1231876d034b58a7c4953
eike commented 2017-05-09 19:00:22 +02:00 (Migrated from edugit.org)

Done

Done
eike commented 2017-05-09 19:00:22 +02:00 (Migrated from edugit.org)

Status changed to closed

Status changed to closed
nik commented 2017-05-09 23:00:45 +02:00 (Migrated from edugit.org)

Status changed to reopened

Status changed to reopened
nik commented 2017-05-09 23:00:46 +02:00 (Migrated from edugit.org)

You missed out on my last comment…

You missed out on my last comment…
nik commented 2017-05-30 15:18:03 +02:00 (Migrated from edugit.org)

Status changed to closed by commit e6427da722

Status changed to closed by commit e6427da72206c4db9c8cf822a08ffcc4bfefc121
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nik/veripeditus-server#115
No description provided.