"""add_rca_accounts Revision ID: 5cc9b7423be5 Revises: 43825f7bb6cc Create Date: 2021-05-07 09:30:34.600997 """ from alembic import op from migrations import utils # revision identifiers, used by Alembic. revision = '5cc9b7423be5' down_revision = '4a7d8076c573' branch_labels = None depends_on = None marketing_accounts = [ {"label_id": 3, "provider_id": 4, "account_id": 296350974500581, "type": 1}, ] def upgrade(): bind = op.get_bind() utils.import_marketing_accounts(bind, marketing_accounts) def downgrade(): bind = op.get_bind() ids = [str(item["account_id"]) for item in marketing_accounts] utils.drop_marketing_accounts(bind, ids)