"""add_campaign_source Revision ID: 84a05eaad817 Revises: 66850b91e86f Create Date: 2020-09-15 10:09:25.514362 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '84a05eaad817' down_revision = '66850b91e86f' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('Campaign', sa.Column('source', sa.String(), nullable=True)) bind = op.get_bind() bind.execute(""" INSERT INTO "ProjectHistoryAction" VALUES (32, 'reject_gras_campaign') """) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### bind = op.get_bind() bind.execute("""DELETE FROM "ProjectHistoryAction" WHERE id = 32""") op.drop_column('Campaign', 'source') # ### end Alembic commands ###