From bf8f621278b745536fba1e21fcf02cc999923bd3 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 8 Aug 2016 17:47:04 -0400 Subject: [PATCH] Temporarily remove the migration which drops the foreign keys on LogEntry, as it is invalid --- ...3159408b5_remove_logentry_fk_constraint.py | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 data/migrations/versions/6243159408b5_remove_logentry_fk_constraint.py diff --git a/data/migrations/versions/6243159408b5_remove_logentry_fk_constraint.py b/data/migrations/versions/6243159408b5_remove_logentry_fk_constraint.py deleted file mode 100644 index 055045cff..000000000 --- a/data/migrations/versions/6243159408b5_remove_logentry_fk_constraint.py +++ /dev/null @@ -1,26 +0,0 @@ -"""remove logentry fk constraint - -Revision ID: 6243159408b5 -Revises: 1093d8b212bb -Create Date: 2016-08-05 13:23:46.219759 - -""" - -# revision identifiers, used by Alembic. -revision = '6243159408b5' -down_revision = '790d91952fa8' - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import mysql - -def upgrade(tables): - op.drop_constraint(u'fk_logentry_account_id_user', 'logentry', type_='foreignkey') - op.drop_constraint(u'fk_logentry_repository_id_repository', 'logentry', type_='foreignkey') - op.drop_constraint(u'fk_logentry_performer_id_user', 'logentry', type_='foreignkey') - - -def downgrade(tables): - op.create_foreign_key(u'fk_logentry_performer_id_user', 'logentry', 'user', ['performer_id'], ['id']) - op.create_foreign_key(u'fk_logentry_repository_id_repository', 'logentry', 'repository', ['repository_id'], ['id']) - op.create_foreign_key(u'fk_logentry_account_id_user', 'logentry', 'user', ['account_id'], ['id'])