@@ -0,0 +1,1032 @@
+%22%22%22add Trope%0A%0ARevision ID: 6ea60f0db6%0ARevises: 5401daf82c9%0ACreate Date: 2014-11-13 01:35:15.619898%0A%0A%22%22%22%0Afrom alembic import op%0Aimport sqlalchemy as sa%0A%0A%0A# revision identifiers, used by Alembic.%0Arevision = '6ea60f0db6'%0Adown_revision = '5401daf82c9'%0A%0A%0Adef upgrade():%0A    op.create_table(%0A        'tropes',%0A        sa.Column('id', sa.Integer(), nullable=False),%0A        sa.Column('name', sa.String(), nullable=False),%0A        sa.PrimaryKeyConstraint('id')%0A    )%0A    op.create_table(%0A        'work_tropes',%0A        sa.Column('work_id', sa.Integer(), nullable=False),%0A        sa.Column('trope_id', sa.Integer(), nullable=False),%0A        sa.ForeignKeyConstraint(%5B'trope_id'%5D, %5B'tropes.id'%5D, ),%0A        sa.ForeignKeyConstraint(%5B'work_id'%5D, %5B'works.id'%5D, ),%0A        sa.PrimaryKeyConstraint('work_id', 'trope_id')%0A    )%0A    op.add_column('works',%0A                  sa.Column('media_type', sa.String(), nullable=False))%0A%0A%0Adef downgrade():%0A    op.drop_column('works', 'media_type')%0A    op.drop_table('work_tropes')%0A    op.drop_table('tropes')%0A

add alembic patch