From 510afd0c93c333e86511fb6f6b9e96a434d54d00 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 28 Sep 2018 14:09:03 -0700 Subject: [PATCH] migrations: Disable atomic for delivery_email migration. I'm not sure theoretically why this should be required only for some installations, but these articles all suggest the root problem is doing these two migrations together atomically (creating the field and setting a value for it), so the right answer is to declare the migration as not atomic: https://stackoverflow.com/questions/12838111/django-db-migrations-cannot-alter-table-because-it-has-pending-trigger-events https://confluence.atlassian.com/confkb/upgrade-failed-with-the-error-message-error-cannot-alter-table-content-because-it-has-pending-trigger-events-747606853.html --- zerver/migrations/0174_userprofile_delivery_email.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zerver/migrations/0174_userprofile_delivery_email.py b/zerver/migrations/0174_userprofile_delivery_email.py index 9bacfe54db..088ab79e12 100644 --- a/zerver/migrations/0174_userprofile_delivery_email.py +++ b/zerver/migrations/0174_userprofile_delivery_email.py @@ -15,6 +15,7 @@ def copy_email_field(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> No class Migration(migrations.Migration): + atomic = False dependencies = [ ('zerver', '0173_support_seat_based_plans'),