|
|
|
@ -21,7 +21,7 @@ def upgrade():
@@ -21,7 +21,7 @@ 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('initiated', 'published', 'started', 'interrupted', 'finished', name='gamestate'), server_default='initiated', nullable=True), |
|
|
|
|
sa.Column('state', sa.Enum('initiated', 'published', 'started', 'interrupted', 'finished', name='gamestate'), server_default='initiated', nullable=False), |
|
|
|
|
sa.Column('start_time', sa.DateTime(), nullable=True), |
|
|
|
|
sa.Column('end_time', sa.DateTime(), nullable=True), |
|
|
|
|
sa.PrimaryKeyConstraint('id') |
|
|
|
@ -39,7 +39,7 @@ def upgrade():
@@ -39,7 +39,7 @@ def upgrade():
|
|
|
|
|
op.create_table('game_player', |
|
|
|
|
sa.Column('game_id', sa.Integer(), nullable=False), |
|
|
|
|
sa.Column('player_id', sa.Integer(), nullable=False), |
|
|
|
|
sa.Column('role', sa.String(length=16), nullable=True), |
|
|
|
|
sa.Column('role', sa.Enum('none', 'owner', 'hunter', 'bunny', name='role'), server_default='none', nullable=False), |
|
|
|
|
sa.ForeignKeyConstraint(['game_id'], ['game.id'], ), |
|
|
|
|
sa.ForeignKeyConstraint(['player_id'], ['player.id'], ), |
|
|
|
|
sa.PrimaryKeyConstraint('game_id', 'player_id') |
|
|
|
|