Reputation: 243
I'm writing a browser turn-based RPG. Nearly every part of the game, including enemies, items, and levels, are rows in an SQL table corresponding to the prototype of that object. This same data is accessible in Wiki format, allowing users to edit this data freely, subject to some community regulation. However, if at this precise moment the game was live, and I was playing, and some troll decided to make the next boss's health "over 9000!", it would be devastating to my campaign, and the losses I suffered would be irreversible. With this in mind, I want to implement a sort of "release system" to the game data. Users can choose for their client to fetch data as it is updated, or to fetch data that has been reviewed and tested on the first of each month. What would be the best way to do this, (although I'm fairly sure the correct answer is "copy your database once a month")?
Upvotes: 0
Views: 52
Reputation: 5755
For your purpose, you want to place a boolean column in your tables "tested" and depending on what mode you are playing in, request either the value for which "tested" is true, or the value for which "tested" is false.
Changes to the values should be stored in their own tables, which are added to the directly accessed values for which "tested" is false. Once a month, the testing reviews these changes and decides which ones should stay. Then the changes may be cleaned if you envision the update process you described to be permanent.
Upvotes: 0