diff --git a/alembic/versions/1f690989e38e_add_pdf_to_task_order.py b/alembic/versions/1f690989e38e_add_pdf_to_task_order.py index a7d30c9a..c22926da 100644 --- a/alembic/versions/1f690989e38e_add_pdf_to_task_order.py +++ b/alembic/versions/1f690989e38e_add_pdf_to_task_order.py @@ -21,15 +21,15 @@ def upgrade(): op.add_column('task_orders', sa.Column('pdf_attachment_id', postgresql.UUID(as_uuid=True), nullable=True)) op.drop_constraint('task_orders_attachments_attachment_id', 'task_orders', type_='foreignkey') op.alter_column('task_orders', 'attachment_id', new_column_name='csp_attachment_id') - op.create_foreign_key(None, 'task_orders', 'attachments', ['pdf_attachment_id'], ['id']) - op.create_foreign_key(None, 'task_orders', 'attachments', ['csp_attachment_id'], ['id']) + op.create_foreign_key('task_orders_attachments_pdf_attachment_id', 'task_orders', 'attachments', ['pdf_attachment_id'], ['id']) + op.create_foreign_key('task_orders_attachments_csp_attachment_id', 'task_orders', 'attachments', ['csp_attachment_id'], ['id']) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.drop_constraint(None, 'task_orders', type_='foreignkey') - op.drop_constraint(None, 'task_orders', type_='foreignkey') + op.drop_constraint('task_orders_attachments_csp_attachment_id', 'task_orders', type_='foreignkey') + op.drop_constraint('task_orders_attachments_pdf_attachment_id', 'task_orders', type_='foreignkey') op.alter_column('task_orders', 'csp_attachment_id', new_column_name='attachment_id') op.create_foreign_key('task_orders_attachments_attachment_id', 'task_orders', 'attachments', ['attachment_id'], ['id']) op.drop_column('task_orders', 'pdf_attachment_id')