"""add_notes_field_to_campaign Revision ID: c8d575e1895c Revises: d13af6030e77 Create Date: 2020-04-24 11:11:45.021991 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c8d575e1895c' down_revision = 'd13af6030e77' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### bind = op.get_bind() op.add_column('Campaign', sa.Column('notes', sa.String(), nullable=True)) op.drop_column('Campaign', 'title') bind.execute('''INSERT INTO "CampaignHistoryAction" (id, type) VALUES (16, 'update_campaign_notes')''') # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### bind = op.get_bind() op.add_column('Campaign', sa.Column('title', sa.VARCHAR(), autoincrement=False, nullable=True)) op.drop_column('Campaign', 'notes') bind.execute('''DELETE FROM "CampaignHistoryAction" WHERE id=16''') # ### end Alembic commands ###