36 lines
795 B
Python
36 lines
795 B
Python
"""Create table `games`.
|
|
|
|
Revision ID: 32ecefbbf8d3
|
|
Revises:
|
|
Create Date: 2015-02-21 11:30:09.451628
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '32ecefbbf8d3'
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlalchemy.dialects.postgresql as pg
|
|
|
|
|
|
def upgrade():
|
|
op.create_table(
|
|
'games',
|
|
sa.Column('id', sa.Integer(), primary_key=True),
|
|
sa.Column('uuid', sa.String(36)),
|
|
sa.Column('map', sa.String(255), index=True),
|
|
sa.Column('date', sa.Date(), index=True),
|
|
sa.Column('time', sa.Time()),
|
|
sa.Column('fraglimit', sa.Integer()),
|
|
sa.Column('attrs', pg.JSON()),
|
|
sa.UniqueConstraint('uuid')
|
|
)
|
|
|
|
|
|
def downgrade():
|
|
op.drop_table('games')
|