Commit | Line | Data |
---|---|---|
ddbe3fef CAW |
1 | """ArchivaLook plugin initial migration |
2 | ||
3 | Revision ID: b10b5f822789 | |
4 | Revises: 52bf0ccbedc1 | |
5 | Create Date: 2016-03-12 23:37:51.551856 | |
6 | ||
7 | """ | |
8 | ||
9 | # revision identifiers, used by Alembic. | |
10 | revision = 'b10b5f822789' | |
11 | down_revision = '52bf0ccbedc1' | |
12 | branch_labels = ('archivalook_plugin',) | |
13 | depends_on = None | |
14 | ||
15 | from alembic import op | |
16 | import sqlalchemy as sa | |
17 | ||
18 | ||
19 | def upgrade(): | |
20 | op.create_table( | |
21 | 'archivalook__featured_media', | |
22 | sa.Column('id', sa.Integer(), nullable=False), | |
23 | sa.Column('media_entry_id', sa.Integer(), nullable=False), | |
24 | sa.Column('display_type', sa.Unicode(), nullable=False), | |
25 | sa.Column('order', sa.Integer(), nullable=False), | |
26 | sa.ForeignKeyConstraint(['media_entry_id'], | |
27 | ['core__media_entries.id']), | |
28 | sa.PrimaryKeyConstraint('id')) | |
29 | ||
30 | ||
31 | def downgrade(): | |
32 | op.drop_table('archivalook__featured_media') |