From afecb2eca6fa35777d2cb3a08bb09dbe3d647dbd Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 13 Aug 2024 09:31:43 -0700 Subject: [PATCH] migrations: Add missing elidable tags on RunPython/RunSQL steps. This helps the squashmigrations tool know that it can squash these. --- analytics/migrations/0009_remove_messages_to_stream_stat.py | 2 +- analytics/migrations/0010_clear_messages_sent_values.py | 2 +- analytics/migrations/0011_clear_analytics_tables.py | 2 +- analytics/migrations/0015_clear_duplicate_counts.py | 4 +++- .../migrations/0018_remove_usercount_active_users_audit.py | 3 ++- analytics/migrations/0019_remove_unused_counts.py | 3 ++- .../0024_zulipsponsorshiprequest_fill_customer_data.py | 3 ++- .../migrations/0035_update_legacy_plan_next_invoice_date.py | 2 +- .../0036_fix_customer_plans_scheduled_after_legacy_plan.py | 2 +- .../0039_backfill_end_date_for_fixed_price_plans.py | 1 + ...0041_fix_plans_on_free_trial_with_changes_in_schedule.py | 1 + .../0043_remove_customer_default_discount_and_more.py | 2 +- .../0261_pregistrationuser_clear_invited_as_admin.py | 4 +++- .../0301_fix_unread_messages_in_deactivated_streams.py | 1 + zerver/migrations/0306_custom_profile_field_date_format.py | 1 + zerver/migrations/0313_finish_is_user_active_migration.py | 4 +++- zerver/migrations/0371_invalid_characters_in_topics.py | 2 +- zerver/migrations/0373_fix_deleteduser_dummies.py | 1 + .../migrations/0375_invalid_characters_in_stream_names.py | 6 +++++- .../0376_set_realmemoji_author_and_reupload_realmemoji.py | 4 +++- zerver/migrations/0377_message_edit_history_format.py | 1 + zerver/migrations/0380_userprofile_uuid_backfill.py | 4 +++- zerver/migrations/0386_fix_attachment_caches.py | 4 +++- zerver/migrations/0387_reupload_realmemoji_again.py | 4 +++- .../0429_user_topic_case_insensitive_unique_toghether.py | 3 ++- zerver/migrations/0436_realmauthenticationmethods.py | 2 +- zerver/migrations/0444_userpresence_fill_data.py | 4 +++- ...57_backfill_scheduledmessagenotificationemail_trigger.py | 2 ++ ...65_backfill_scheduledmessagenotificationemail_trigger.py | 1 + .../migrations/0468_rename_followup_day_email_templates.py | 1 + zerver/migrations/0480_realm_backfill_uuid_and_secret.py | 4 +++- .../0496_alter_scheduledmessage_read_by_sender.py | 1 + .../0500_realm_zulip_update_announcements_stream.py | 1 + zerver/migrations/0501_delete_dangling_usermessages.py | 4 +++- .../0501_mark_introduce_zulip_view_modals_as_read.py | 1 + zerver/migrations/0563_zulipinternal_can_delete.py | 3 ++- zerver/migrations/0564_purge_nagios_messages.py | 3 +-- .../0032_remotepushdevicetoken_backfill_ios_app_id.py | 1 + ...lter_remoteinstallationcount_unique_together_and_more.py | 4 +++- .../migrations/0052_alter_remoterealm_plan_type_and_more.py | 4 +++- 40 files changed, 74 insertions(+), 28 deletions(-) diff --git a/analytics/migrations/0009_remove_messages_to_stream_stat.py b/analytics/migrations/0009_remove_messages_to_stream_stat.py index 63b4e5cfcf..42a2bffd89 100644 --- a/analytics/migrations/0009_remove_messages_to_stream_stat.py +++ b/analytics/migrations/0009_remove_messages_to_stream_stat.py @@ -26,5 +26,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(delete_messages_sent_to_stream_stat), + migrations.RunPython(delete_messages_sent_to_stream_stat, elidable=True), ] diff --git a/analytics/migrations/0010_clear_messages_sent_values.py b/analytics/migrations/0010_clear_messages_sent_values.py index 6eee10dd4c..b43bcdf069 100644 --- a/analytics/migrations/0010_clear_messages_sent_values.py +++ b/analytics/migrations/0010_clear_messages_sent_values.py @@ -24,5 +24,5 @@ class Migration(migrations.Migration): dependencies = [("analytics", "0009_remove_messages_to_stream_stat")] operations = [ - migrations.RunPython(clear_message_sent_by_message_type_values), + migrations.RunPython(clear_message_sent_by_message_type_values, elidable=True), ] diff --git a/analytics/migrations/0011_clear_analytics_tables.py b/analytics/migrations/0011_clear_analytics_tables.py index 577d2788e7..b15eb9cc81 100644 --- a/analytics/migrations/0011_clear_analytics_tables.py +++ b/analytics/migrations/0011_clear_analytics_tables.py @@ -23,5 +23,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(clear_analytics_tables), + migrations.RunPython(clear_analytics_tables, elidable=True), ] diff --git a/analytics/migrations/0015_clear_duplicate_counts.py b/analytics/migrations/0015_clear_duplicate_counts.py index 9a415fffef..c8c33cf49d 100644 --- a/analytics/migrations/0015_clear_duplicate_counts.py +++ b/analytics/migrations/0015_clear_duplicate_counts.py @@ -60,5 +60,7 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(clear_duplicate_counts, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + clear_duplicate_counts, reverse_code=migrations.RunPython.noop, elidable=True + ), ] diff --git a/analytics/migrations/0018_remove_usercount_active_users_audit.py b/analytics/migrations/0018_remove_usercount_active_users_audit.py index 704c18aade..02615e45e8 100644 --- a/analytics/migrations/0018_remove_usercount_active_users_audit.py +++ b/analytics/migrations/0018_remove_usercount_active_users_audit.py @@ -10,6 +10,7 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL( - "DELETE FROM analytics_usercount WHERE property = 'active_users_audit:is_bot:day'" + "DELETE FROM analytics_usercount WHERE property = 'active_users_audit:is_bot:day'", + elidable=True, ) ] diff --git a/analytics/migrations/0019_remove_unused_counts.py b/analytics/migrations/0019_remove_unused_counts.py index 56d3d8a7ec..a74c371bf9 100644 --- a/analytics/migrations/0019_remove_unused_counts.py +++ b/analytics/migrations/0019_remove_unused_counts.py @@ -21,6 +21,7 @@ class Migration(migrations.Migration): "DELETE FROM analytics_installationcount WHERE property IN %s", (REMOVED_COUNTS,), ), - ] + ], + elidable=True, ) ] diff --git a/corporate/migrations/0024_zulipsponsorshiprequest_fill_customer_data.py b/corporate/migrations/0024_zulipsponsorshiprequest_fill_customer_data.py index b9979bda63..a882304682 100644 --- a/corporate/migrations/0024_zulipsponsorshiprequest_fill_customer_data.py +++ b/corporate/migrations/0024_zulipsponsorshiprequest_fill_customer_data.py @@ -13,6 +13,7 @@ class Migration(migrations.Migration): SET customer_id = ( SELECT id FROM corporate_customer WHERE corporate_customer.realm_id = corporate_zulipsponsorshiprequest.realm_id ) - """ + """, + elidable=True, ), ] diff --git a/corporate/migrations/0035_update_legacy_plan_next_invoice_date.py b/corporate/migrations/0035_update_legacy_plan_next_invoice_date.py index c636713a27..9a81f7237e 100644 --- a/corporate/migrations/0035_update_legacy_plan_next_invoice_date.py +++ b/corporate/migrations/0035_update_legacy_plan_next_invoice_date.py @@ -24,5 +24,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(update_legacy_plan_next_invoice_date), + migrations.RunPython(update_legacy_plan_next_invoice_date, elidable=True), ] diff --git a/corporate/migrations/0036_fix_customer_plans_scheduled_after_legacy_plan.py b/corporate/migrations/0036_fix_customer_plans_scheduled_after_legacy_plan.py index 581e519b28..0528ce2b63 100644 --- a/corporate/migrations/0036_fix_customer_plans_scheduled_after_legacy_plan.py +++ b/corporate/migrations/0036_fix_customer_plans_scheduled_after_legacy_plan.py @@ -36,5 +36,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(fix_customer_plans_scheduled_after_legacy_plan), + migrations.RunPython(fix_customer_plans_scheduled_after_legacy_plan, elidable=True), ] diff --git a/corporate/migrations/0039_backfill_end_date_for_fixed_price_plans.py b/corporate/migrations/0039_backfill_end_date_for_fixed_price_plans.py index 495fd6fba1..6f64437ab4 100644 --- a/corporate/migrations/0039_backfill_end_date_for_fixed_price_plans.py +++ b/corporate/migrations/0039_backfill_end_date_for_fixed_price_plans.py @@ -58,5 +58,6 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython( backfill_end_date_for_fixed_price_plans, + elidable=True, ), ] diff --git a/corporate/migrations/0041_fix_plans_on_free_trial_with_changes_in_schedule.py b/corporate/migrations/0041_fix_plans_on_free_trial_with_changes_in_schedule.py index eb65c83721..089c6d5509 100644 --- a/corporate/migrations/0041_fix_plans_on_free_trial_with_changes_in_schedule.py +++ b/corporate/migrations/0041_fix_plans_on_free_trial_with_changes_in_schedule.py @@ -46,5 +46,6 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython( fix_plans_on_free_trial_with_changes_in_schedule, + elidable=True, ), ] diff --git a/corporate/migrations/0043_remove_customer_default_discount_and_more.py b/corporate/migrations/0043_remove_customer_default_discount_and_more.py index 21e7d2c4af..1cc796c140 100644 --- a/corporate/migrations/0043_remove_customer_default_discount_and_more.py +++ b/corporate/migrations/0043_remove_customer_default_discount_and_more.py @@ -75,7 +75,7 @@ class Migration(migrations.Migration): field=models.IntegerField(default=0), ), # Populate the new discounted price fields based on existing default discount. - migrations.RunPython(calculate_discounted_price), + migrations.RunPython(calculate_discounted_price, elidable=True), migrations.RemoveField( model_name="customer", name="default_discount", diff --git a/zerver/migrations/0261_pregistrationuser_clear_invited_as_admin.py b/zerver/migrations/0261_pregistrationuser_clear_invited_as_admin.py index 42dc704bcc..4073512ae0 100644 --- a/zerver/migrations/0261_pregistrationuser_clear_invited_as_admin.py +++ b/zerver/migrations/0261_pregistrationuser_clear_invited_as_admin.py @@ -36,6 +36,8 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython( - clear_preregistrationuser_invited_as_admin, reverse_code=migrations.RunPython.noop + clear_preregistrationuser_invited_as_admin, + reverse_code=migrations.RunPython.noop, + elidable=True, ), ] diff --git a/zerver/migrations/0301_fix_unread_messages_in_deactivated_streams.py b/zerver/migrations/0301_fix_unread_messages_in_deactivated_streams.py index 84d5c2c543..f2603f2a39 100644 --- a/zerver/migrations/0301_fix_unread_messages_in_deactivated_streams.py +++ b/zerver/migrations/0301_fix_unread_messages_in_deactivated_streams.py @@ -23,5 +23,6 @@ class Migration(migrations.Migration): AND zerver_stream.deactivated; """, reverse_sql="", + elidable=True, ), ] diff --git a/zerver/migrations/0306_custom_profile_field_date_format.py b/zerver/migrations/0306_custom_profile_field_date_format.py index db006cefca..7a597edaeb 100644 --- a/zerver/migrations/0306_custom_profile_field_date_format.py +++ b/zerver/migrations/0306_custom_profile_field_date_format.py @@ -26,5 +26,6 @@ class Migration(migrations.Migration): END; """, reverse_sql="", + elidable=True, ), ] diff --git a/zerver/migrations/0313_finish_is_user_active_migration.py b/zerver/migrations/0313_finish_is_user_active_migration.py index d4bbffa708..1989c9b302 100644 --- a/zerver/migrations/0313_finish_is_user_active_migration.py +++ b/zerver/migrations/0313_finish_is_user_active_migration.py @@ -41,7 +41,9 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(backfill_is_user_active, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + backfill_is_user_active, reverse_code=migrations.RunPython.noop, elidable=True + ), # Make the field non-null now that we backfilled. migrations.AlterField( model_name="subscription", diff --git a/zerver/migrations/0371_invalid_characters_in_topics.py b/zerver/migrations/0371_invalid_characters_in_topics.py index 4cade25f5d..ce7b770206 100644 --- a/zerver/migrations/0371_invalid_characters_in_topics.py +++ b/zerver/migrations/0371_invalid_characters_in_topics.py @@ -75,5 +75,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(fix_topics, reverse_code=migrations.RunPython.noop), + migrations.RunPython(fix_topics, reverse_code=migrations.RunPython.noop, elidable=True), ] diff --git a/zerver/migrations/0373_fix_deleteduser_dummies.py b/zerver/migrations/0373_fix_deleteduser_dummies.py index 787c3cff88..a6c9aa45af 100644 --- a/zerver/migrations/0373_fix_deleteduser_dummies.py +++ b/zerver/migrations/0373_fix_deleteduser_dummies.py @@ -83,5 +83,6 @@ class Migration(migrations.Migration): migrations.RunPython( fix_dummy_users, reverse_code=migrations.RunPython.noop, + elidable=True, ) ] diff --git a/zerver/migrations/0375_invalid_characters_in_stream_names.py b/zerver/migrations/0375_invalid_characters_in_stream_names.py index 9769df97f5..b4e46f4ff2 100644 --- a/zerver/migrations/0375_invalid_characters_in_stream_names.py +++ b/zerver/migrations/0375_invalid_characters_in_stream_names.py @@ -76,5 +76,9 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(fix_stream_names, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + fix_stream_names, + reverse_code=migrations.RunPython.noop, + elidable=True, + ), ] diff --git a/zerver/migrations/0376_set_realmemoji_author_and_reupload_realmemoji.py b/zerver/migrations/0376_set_realmemoji_author_and_reupload_realmemoji.py index 5758fdff40..2bff70a39f 100644 --- a/zerver/migrations/0376_set_realmemoji_author_and_reupload_realmemoji.py +++ b/zerver/migrations/0376_set_realmemoji_author_and_reupload_realmemoji.py @@ -38,5 +38,7 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(set_emoji_author, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + set_emoji_author, reverse_code=migrations.RunPython.noop, elidable=True + ), ] diff --git a/zerver/migrations/0377_message_edit_history_format.py b/zerver/migrations/0377_message_edit_history_format.py index 8cac73d2ed..14bc6be2a2 100644 --- a/zerver/migrations/0377_message_edit_history_format.py +++ b/zerver/migrations/0377_message_edit_history_format.py @@ -164,5 +164,6 @@ class Migration(migrations.Migration): migrations.RunPython( copy_and_update_message_edit_history, reverse_code=migrations.RunPython.noop, + elidable=True, ), ] diff --git a/zerver/migrations/0380_userprofile_uuid_backfill.py b/zerver/migrations/0380_userprofile_uuid_backfill.py index a66170a15f..0557bbbe83 100644 --- a/zerver/migrations/0380_userprofile_uuid_backfill.py +++ b/zerver/migrations/0380_userprofile_uuid_backfill.py @@ -36,5 +36,7 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(backfill_user_profile_uuid, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + backfill_user_profile_uuid, reverse_code=migrations.RunPython.noop, elidable=True + ), ] diff --git a/zerver/migrations/0386_fix_attachment_caches.py b/zerver/migrations/0386_fix_attachment_caches.py index 0c6a8b74c2..83ecd881e2 100644 --- a/zerver/migrations/0386_fix_attachment_caches.py +++ b/zerver/migrations/0386_fix_attachment_caches.py @@ -72,5 +72,7 @@ class Migration(migrations.Migration): to="zerver.ArchivedMessage", ), ), - migrations.RunPython(fix_attachment_caches, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + fix_attachment_caches, reverse_code=migrations.RunPython.noop, elidable=True + ), ] diff --git a/zerver/migrations/0387_reupload_realmemoji_again.py b/zerver/migrations/0387_reupload_realmemoji_again.py index 6b5ea4bcea..bdff80e250 100644 --- a/zerver/migrations/0387_reupload_realmemoji_again.py +++ b/zerver/migrations/0387_reupload_realmemoji_again.py @@ -43,5 +43,7 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(reupload_realm_emoji, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + reupload_realm_emoji, reverse_code=migrations.RunPython.noop, elidable=True + ), ] diff --git a/zerver/migrations/0429_user_topic_case_insensitive_unique_toghether.py b/zerver/migrations/0429_user_topic_case_insensitive_unique_toghether.py index 2d5c361219..eaf5554b5f 100644 --- a/zerver/migrations/0429_user_topic_case_insensitive_unique_toghether.py +++ b/zerver/migrations/0429_user_topic_case_insensitive_unique_toghether.py @@ -18,7 +18,8 @@ class Migration(migrations.Migration): migrations.RunSQL( """ DELETE FROM zerver_usertopic WHERE id NOT IN (SELECT max(id) FROM zerver_usertopic GROUP BY (user_profile_id, stream_id, upper(topic_name::text))); - """ + """, + elidable=True, ), migrations.AddConstraint( model_name="usertopic", diff --git a/zerver/migrations/0436_realmauthenticationmethods.py b/zerver/migrations/0436_realmauthenticationmethods.py index 0716113e54..f515687864 100644 --- a/zerver/migrations/0436_realmauthenticationmethods.py +++ b/zerver/migrations/0436_realmauthenticationmethods.py @@ -49,5 +49,5 @@ class Migration(migrations.Migration): "unique_together": {("realm", "name")}, }, ), - migrations.RunPython(fill_RealmAuthenticationMethod_data), + migrations.RunPython(fill_RealmAuthenticationMethod_data, elidable=True), ] diff --git a/zerver/migrations/0444_userpresence_fill_data.py b/zerver/migrations/0444_userpresence_fill_data.py index dc9c11b3c6..b7c8007e7c 100644 --- a/zerver/migrations/0444_userpresence_fill_data.py +++ b/zerver/migrations/0444_userpresence_fill_data.py @@ -66,4 +66,6 @@ class Migration(migrations.Migration): ("zerver", "0443_userpresence_new_table_schema"), ] - operations = [migrations.RunPython(fill_new_columns, reverse_code=clear_new_columns)] + operations = [ + migrations.RunPython(fill_new_columns, reverse_code=clear_new_columns, elidable=True) + ] diff --git a/zerver/migrations/0457_backfill_scheduledmessagenotificationemail_trigger.py b/zerver/migrations/0457_backfill_scheduledmessagenotificationemail_trigger.py index fddcbbd8c3..e83543691d 100644 --- a/zerver/migrations/0457_backfill_scheduledmessagenotificationemail_trigger.py +++ b/zerver/migrations/0457_backfill_scheduledmessagenotificationemail_trigger.py @@ -20,6 +20,7 @@ class Migration(migrations.Migration): SET trigger = 'wildcard_mentioned' WHERE trigger = 'stream_wildcard_mentioned'; """, + elidable=True, ), migrations.RunSQL( """ @@ -32,5 +33,6 @@ class Migration(migrations.Migration): SET trigger = 'followed_topic_wildcard_mentioned' WHERE trigger = 'stream_wildcard_mentioned_in_followed_topic'; """, + elidable=True, ), ] diff --git a/zerver/migrations/0465_backfill_scheduledmessagenotificationemail_trigger.py b/zerver/migrations/0465_backfill_scheduledmessagenotificationemail_trigger.py index c960a2bb69..8269145dbe 100644 --- a/zerver/migrations/0465_backfill_scheduledmessagenotificationemail_trigger.py +++ b/zerver/migrations/0465_backfill_scheduledmessagenotificationemail_trigger.py @@ -20,5 +20,6 @@ class Migration(migrations.Migration): SET trigger = 'private_message' WHERE trigger = 'direct_message'; """, + elidable=True, ), ] diff --git a/zerver/migrations/0468_rename_followup_day_email_templates.py b/zerver/migrations/0468_rename_followup_day_email_templates.py index 1d393adc76..f8c24abd43 100644 --- a/zerver/migrations/0468_rename_followup_day_email_templates.py +++ b/zerver/migrations/0468_rename_followup_day_email_templates.py @@ -91,5 +91,6 @@ class Migration(migrations.Migration): migrations.RunPython( update_for_followup_day_email_templates_rename, reverse_code=revert_followup_day_email_templates_rename, + elidable=True, ), ] diff --git a/zerver/migrations/0480_realm_backfill_uuid_and_secret.py b/zerver/migrations/0480_realm_backfill_uuid_and_secret.py index 75d47c90d1..79bb63a092 100644 --- a/zerver/migrations/0480_realm_backfill_uuid_and_secret.py +++ b/zerver/migrations/0480_realm_backfill_uuid_and_secret.py @@ -64,6 +64,8 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython( - backfill_realm_uuid_and_secret, reverse_code=migrations.RunPython.noop + backfill_realm_uuid_and_secret, + reverse_code=migrations.RunPython.noop, + elidable=True, ), ] diff --git a/zerver/migrations/0496_alter_scheduledmessage_read_by_sender.py b/zerver/migrations/0496_alter_scheduledmessage_read_by_sender.py index bf49354645..6dbd288dde 100644 --- a/zerver/migrations/0496_alter_scheduledmessage_read_by_sender.py +++ b/zerver/migrations/0496_alter_scheduledmessage_read_by_sender.py @@ -42,6 +42,7 @@ class Migration(migrations.Migration): migrations.RunPython( populate_read_by_sender, reverse_code=migrations.RunPython.noop, + elidable=True, ), migrations.AlterField( model_name="scheduledmessage", diff --git a/zerver/migrations/0500_realm_zulip_update_announcements_stream.py b/zerver/migrations/0500_realm_zulip_update_announcements_stream.py index 8113d42b44..58cbe4b58a 100644 --- a/zerver/migrations/0500_realm_zulip_update_announcements_stream.py +++ b/zerver/migrations/0500_realm_zulip_update_announcements_stream.py @@ -36,5 +36,6 @@ class Migration(migrations.Migration): migrations.RunPython( set_initial_value_for_zulip_update_announcements_stream, reverse_code=migrations.RunPython.noop, + elidable=True, ), ] diff --git a/zerver/migrations/0501_delete_dangling_usermessages.py b/zerver/migrations/0501_delete_dangling_usermessages.py index f7c9ebc7e5..45f0e949f0 100644 --- a/zerver/migrations/0501_delete_dangling_usermessages.py +++ b/zerver/migrations/0501_delete_dangling_usermessages.py @@ -202,7 +202,9 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL(BUILD_BAD_MOVES_TABLE, elidable=True), migrations.RunSQL(BROADEN_MOVES, elidable=True), - migrations.RunPython(log_extra_usermessage_rows, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + log_extra_usermessage_rows, reverse_code=migrations.RunPython.noop, elidable=True + ), migrations.RunSQL( """ DELETE FROM zerver_usermessage diff --git a/zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py b/zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py index 5a8d08929f..3a3d503ce3 100644 --- a/zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py +++ b/zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py @@ -71,5 +71,6 @@ class Migration(migrations.Migration): migrations.RunPython( mark_introduce_zulip_view_modals_as_read, reverse_code=mark_introduce_zulip_view_modals_as_unread, + elidable=True, ), ] diff --git a/zerver/migrations/0563_zulipinternal_can_delete.py b/zerver/migrations/0563_zulipinternal_can_delete.py index cbdc298f0c..e19665a521 100644 --- a/zerver/migrations/0563_zulipinternal_can_delete.py +++ b/zerver/migrations/0563_zulipinternal_can_delete.py @@ -8,6 +8,7 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL( - "UPDATE zerver_realm SET delete_own_message_policy = 1 where string_id = 'zulipinternal'" + "UPDATE zerver_realm SET delete_own_message_policy = 1 where string_id = 'zulipinternal'", + elidable=True, ) ] diff --git a/zerver/migrations/0564_purge_nagios_messages.py b/zerver/migrations/0564_purge_nagios_messages.py index ab381e1fa3..06143eb4ba 100644 --- a/zerver/migrations/0564_purge_nagios_messages.py +++ b/zerver/migrations/0564_purge_nagios_messages.py @@ -87,10 +87,9 @@ def purge_nagios_messages(apps: StateApps, schema_editor: BaseDatabaseSchemaEdit class Migration(migrations.Migration): atomic = False - elidable = True dependencies = [ ("zerver", "0563_zulipinternal_can_delete"), ] - operations = [migrations.RunPython(purge_nagios_messages)] + operations = [migrations.RunPython(purge_nagios_messages, elidable=True)] diff --git a/zilencer/migrations/0032_remotepushdevicetoken_backfill_ios_app_id.py b/zilencer/migrations/0032_remotepushdevicetoken_backfill_ios_app_id.py index 62c2d6bc94..ec97a318d9 100644 --- a/zilencer/migrations/0032_remotepushdevicetoken_backfill_ios_app_id.py +++ b/zilencer/migrations/0032_remotepushdevicetoken_backfill_ios_app_id.py @@ -32,5 +32,6 @@ class Migration(migrations.Migration): # The updated table is still valid with the old schema; # so to reverse, a no-op suffices. reverse_sql=[], + elidable=True, ), ] diff --git a/zilencer/migrations/0037_alter_remoteinstallationcount_unique_together_and_more.py b/zilencer/migrations/0037_alter_remoteinstallationcount_unique_together_and_more.py index 8ef1f79a7b..d3195958fd 100644 --- a/zilencer/migrations/0037_alter_remoteinstallationcount_unique_together_and_more.py +++ b/zilencer/migrations/0037_alter_remoteinstallationcount_unique_together_and_more.py @@ -49,7 +49,9 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(clear_duplicate_counts, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + clear_duplicate_counts, reverse_code=migrations.RunPython.noop, elidable=True + ), migrations.AddConstraint( model_name="remoteinstallationcount", constraint=models.UniqueConstraint( diff --git a/zilencer/migrations/0052_alter_remoterealm_plan_type_and_more.py b/zilencer/migrations/0052_alter_remoterealm_plan_type_and_more.py index 209e24cfdb..6e9a57702f 100644 --- a/zilencer/migrations/0052_alter_remoterealm_plan_type_and_more.py +++ b/zilencer/migrations/0052_alter_remoterealm_plan_type_and_more.py @@ -35,5 +35,7 @@ class Migration(migrations.Migration): name="plan_type", field=models.PositiveSmallIntegerField(default=PLAN_TYPE_SELF_MANAGED), ), - migrations.RunPython(renumber_plan_types, reverse_code=migrations.RunPython.noop), + migrations.RunPython( + renumber_plan_types, reverse_code=migrations.RunPython.noop, elidable=True + ), ]