openmedialibrary/migrations/versions/21589282102d_.py

37 lines
1 KiB
Python
Raw Normal View History

2014-05-14 09:57:11 +00:00
"""empty message
Revision ID: 21589282102d
Revises: 2350803a5a2d
Create Date: 2014-05-13 15:47:29.747858
"""
# revision identifiers, used by Alembic.
revision = '21589282102d'
down_revision = '2350803a5a2d'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('filter',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('item_id', sa.String(length=32), nullable=True),
sa.Column('key', sa.String(length=200), nullable=True),
sa.Column('value', sa.Text(), nullable=True),
sa.Column('findvalue', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['item_id'], ['item.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_filter_key'), 'filter', ['key'], unique=False)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_filter_key'), table_name='filter')
op.drop_table('filter')
### end Alembic commands ###