Select Git revision
d5be0f66b32d_.py
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
d5be0f66b32d_.py 2.26 KiB
"""empty message
Revision ID: d5be0f66b32d
Revises: b4156f71ee73
Create Date: 2017-03-01 04:32:20.328667
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd5be0f66b32d'
down_revision = 'b4156f71ee73'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('defaultmetas',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('protocoltype_id', sa.Integer(), nullable=True),
sa.Column('key', sa.String(), nullable=True),
sa.Column('name', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['protocoltype_id'], ['protocoltypes.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('metas',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('protocol_id', sa.Integer(), nullable=True),
sa.Column('name', sa.String(), nullable=True),
sa.Column('value', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['protocol_id'], ['protocols.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.drop_table('defaultmeta')
op.drop_table('meta')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('meta',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('protocol_id', sa.INTEGER(), autoincrement=False, nullable=True),
sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column('value', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.ForeignKeyConstraint(['protocol_id'], ['protocols.id'], name='meta_protocol_id_fkey'),
sa.PrimaryKeyConstraint('id', name='meta_pkey')
)
op.create_table('defaultmeta',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('protocoltype_id', sa.INTEGER(), autoincrement=False, nullable=True),
sa.Column('key', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.ForeignKeyConstraint(['protocoltype_id'], ['protocoltypes.id'], name='defaultmeta_protocoltype_id_fkey'),
sa.PrimaryKeyConstraint('id', name='defaultmeta_pkey')
)
op.drop_table('metas')
op.drop_table('defaultmetas')
# ### end Alembic commands ###