Skip to content
Browse files

make it possible to mark game as finished

  • Loading branch information...
1 parent 8429fe5 commit b77985088685bbc117bc9715d31f192e3823eb3d @depesz committed Mar 28, 2012
Showing with 10 additions and 0 deletions.
  1. +9 −0 sql/patches/finishing_games.sql
  2. +1 −0 sql/stable-full.sql
View
9 sql/patches/finishing_games.sql
@@ -0,0 +1,9 @@
+BEGIN;
+ SELECT _v.register_patch( 'finishing_games', ARRAY[ 'games' ], NULL );
+
+ ALTER TABLE games ADD COLUMN is_finished bool;
+ UPDATE games SET is_finished = true;
+ ALTER TABLE games ALTER COLUMN is_finished SET NOT NULL;
+ ALTER TABLE games ALTER COLUMN is_finished SET DEFAULT false;
+
+COMMIT;
View
1 sql/stable-full.sql
@@ -2,3 +2,4 @@
\i patches/games.sql
\i patches/base_data.sql
\i patches/base_data-2.sql
+\i patches/finishing_games.sql

0 comments on commit b779850

Please sign in to comment.
Something went wrong with that request. Please try again.