@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
""" add pcp review
""" replace gamestate with hidden and paused
Revision ID : d87b14d6a90c
Revision ID : 7 a3183ce450a
Revises :
Create Date : 2020 - 07 - 21 21 : 47 : 51.061829
Create Date : 2020 - 07 - 29 10 : 55 : 07.589462
"""
from alembic import op
@ -10,7 +10,7 @@ import sqlalchemy as sa
@@ -10,7 +10,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = ' d87b14d6a90c '
revision = ' 7a3183ce450a '
down_revision = None
branch_labels = None
depends_on = None
@ -21,7 +21,8 @@ def upgrade():
@@ -21,7 +21,8 @@ def upgrade():
op . create_table ( ' game ' ,
sa . Column ( ' id ' , sa . Integer ( ) , nullable = False ) ,
sa . Column ( ' name ' , sa . String ( length = 64 ) , nullable = False ) ,
sa . Column ( ' state ' , sa . Enum ( ' hidden ' , ' published ' , ' active ' , ' interrupted ' , ' finished ' , name = ' gamestate ' ) , server_default = ' hidden ' , nullable = False ) ,
sa . Column ( ' hidden ' , sa . Boolean ( ) , server_default = ' 1 ' , nullable = False ) ,
sa . Column ( ' paused ' , sa . Boolean ( ) , server_default = ' 0 ' , nullable = False ) ,
sa . Column ( ' start_time ' , sa . DateTime ( ) , nullable = True ) ,
sa . Column ( ' end_time ' , sa . DateTime ( ) , nullable = True ) ,
sa . PrimaryKeyConstraint ( ' id ' )
@ -79,7 +80,7 @@ def upgrade():
@@ -79,7 +80,7 @@ def upgrade():
op . create_table ( ' notification_player ' ,
sa . Column ( ' notification_id ' , sa . Integer ( ) , nullable = False ) ,
sa . Column ( ' game_player_id ' , sa . Integer ( ) , nullable = False ) ,
sa . Column ( ' been_shown ' , sa . Boolean ( ) , server_default = ' True ' , nullable = False ) ,
sa . Column ( ' been_shown ' , sa . Boolean ( ) , server_default = ' 0 ' , nullable = False ) ,
sa . ForeignKeyConstraint ( [ ' game_player_id ' ] , [ ' game_player.id ' ] , ) ,
sa . ForeignKeyConstraint ( [ ' notification_id ' ] , [ ' notification.id ' ] , ) ,
sa . PrimaryKeyConstraint ( ' notification_id ' , ' game_player_id ' )