Commit 1e6a74e7 by Ned Batchelder

No-op a migration that needs to be more clever

parent 3055f9b2
......@@ -10,9 +10,25 @@ class Migration(migrations.Migration):
('student', '0009_auto_20170111_0422'),
]
# This migration was to add a constraint that we lost in the Django
# 1.4->1.8 upgrade. But since the constraint used to be created, production
# would already have the constraint even before running the migration, and
# running the migration would fail. We needed to make the migration
# idempotent. Instead of reverting this migration while we did that, we
# edited it to be a SQL no-op, so that people who had already applied it
# wouldn't end up with a ghost migration.
# It had been:
#
# migrations.RunSQL(
# "create unique index email on auth_user (email);",
# "drop index email on auth_user;"
# )
operations = [
migrations.RunSQL(
"create unique index email on auth_user (email);",
"drop index email on auth_user;"
# Do nothing:
"select 1",
"select 1"
)
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment