diff options
author | Arun Persaud <arun@nubati.net> | 2012-06-09 08:53:39 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2012-06-09 09:48:09 -0700 |
commit | 5d1647f138763213a32e3e1ba426e3f86157f018 (patch) | |
tree | 0b7c1ffdf98bd0f42c4e09377e3747f3535478f9 /update_db.php | |
parent | 21099cf40f1696e4e2213e3a497246a2e5570209 (diff) | |
download | e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.tar.gz e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.tar.bz2 e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.zip |
Remove games from digest where the player already moved
Diffstat (limited to 'update_db.php')
-rw-r--r-- | update_db.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/update_db.php b/update_db.php index b47a94a..edb01f9 100644 --- a/update_db.php +++ b/update_db.php @@ -38,7 +38,7 @@ if(isset($_SERVER['REMOTE_ADDR'])) exit(); $old_version = DB_get_version(); -$current_version = 3; +$current_version = 4; if($old_version < $current_version) echo "Will upgrade your database now:\n"; @@ -74,6 +74,13 @@ switch($old_version) " ADD COLUMN `game_id` int(11) default NULL AFTER play_id"); DB_query("UPDATE Version set version=3"); echo "Upgraded to version 3.\n"; + case 3: + DB_query("ALTER TABLE digest_email". + " ADD COLUMN `game_id` int(11) default NULL AFTER create_date"); + DB_query("ALTER TABLE digest_email". + " ADD COLUMN `type` enum('misc','your_turn') NOT NULL default 'misc' AFTER create_date"); + DB_query("UPDATE Version set version=4"); + echo "Upgraded to version 4.\n"; } |