<gh_stars>0
"""card types and play logs

Revision ID: 3730c2fb7e84
Revises: ea6f4ddd78a9
Create Date: 2016-10-04 12:37:38.940384

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = 'ea6f4ddd78a9'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('kingdomplay',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), server_default=sa.text('gen_random_uuid()'), nullable=False),
    sa.Column('created', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('updated', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('deleted', sa.DateTime(), nullable=True),
    sa.Column('kingdom', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('player_count', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['kingdom'], ['kingdom.uuid'], name=op.f('fk_kingdomplay_kingdom_kingdom')),
    sa.PrimaryKeyConstraint('uuid', name=op.f('pk_kingdomplay'))
    )
    op.create_table('cardtype',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), server_default=sa.text('gen_random_uuid()'), nullable=False),
    sa.Column('created', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('updated', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('deleted', sa.DateTime(), nullable=True),
    sa.Column('name', postgresql.ENUM('action', 'attack', 'castle', 'curse', 'duration', 'event', 'gathering', 'knight', 'landmark', 'looter', 'prize', 'reaction', 'reserve', 'ruins', 'shelter', 'traveller', 'treasure', 'victory', name='card_type_name'), nullable=False),
    sa.Column('card', postgresql.UUID(as_uuid=True), nullable=False),
    sa.ForeignKeyConstraint(['card'], ['card.uuid'], name=op.f('fk_cardtype_card_card')),
    sa.PrimaryKeyConstraint('uuid', name=op.f('pk_cardtype'))
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('cardtype')
    op.drop_table('kingdomplay')
    ### end Alembic commands ###

"""card types and play logs

Revision ID: 3730c2fb7e84
Revises: ea6f4ddd78a9
Create Date: 2016-10-04 12:37:38.940384

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = 'ea6f4ddd78a9'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('kingdomplay',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), server_default=sa.text('gen_random_uuid()'), nullable=False),
    sa.Column('created', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('updated', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('deleted', sa.DateTime(), nullable=True),
    sa.Column('kingdom', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('player_count', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['kingdom'], ['kingdom.uuid'], name=op.f('fk_kingdomplay_kingdom_kingdom')),
    sa.PrimaryKeyConstraint('uuid', name=op.f('pk_kingdomplay'))
    )
    op.create_table('cardtype',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), server_default=sa.text('gen_random_uuid()'), nullable=False),
    sa.Column('created', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('updated', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
    sa.Column('deleted', sa.DateTime(), nullable=True),
    sa.Column('name', postgresql.ENUM('action', 'attack', 'castle', 'curse', 'duration', 'event', 'gathering', 'knight', 'landmark', 'looter', 'prize', 'reaction', 'reserve', 'ruins', 'shelter', 'traveller', 'treasure', 'victory', name='card_type_name'), nullable=False),
    sa.Column('card', postgresql.UUID(as_uuid=True), nullable=False),
    sa.ForeignKeyConstraint(['card'], ['card.uuid'], name=op.f('fk_cardtype_card_card')),
    sa.PrimaryKeyConstraint('uuid', name=op.f('pk_cardtype'))
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('cardtype')
    op.drop_table('kingdomplay')
    ### end Alembic commands ###
card types and play logs  Revision ID: 3730c2fb7e84 Revises: ea6f4ddd78a9 Create Date: 2016-10-04 12:37:38.940384 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###