From f3aab198290ff1bc1a44c39bba7e89d8490c75bb Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 25 Mar 2022 15:48:20 +0000 Subject: [PATCH] DEV: Promote historic post_deploy migrations (#16288) This commit promotes all post_deploy migrations which existed in Discourse v2.7.13 (timestamp <= 20210328233843) This reduces the likelihood of issues relating to migration run order Also fixes a couple of typos in `script/promote_migrations` --- ...25100452_migrate_search_data_after_default_locale_rename.rb | 0 .../20210127140730_undo_add_processed_to_notifications.rb | 0 .../20210207232853_fix_topic_timer_duration_minutes.rb | 0 ...15231312_fix_group_flair_avatar_upload_security_and_acls.rb | 0 .../20210218022739_move_new_since_to_new_table_again.rb | 0 .../20210219171329_drop_old_sso_site_settings.rb | 0 .../20210302164429_drop_flash_onebox_site_setting.rb | 0 .../20210324043327_delete_orphan_post_revisions.rb | 0 .../20210328233843_fix_bookmarks_with_incorrect_topic_id.rb | 0 script/promote_migrations | 3 ++- 10 files changed, 2 insertions(+), 1 deletion(-) rename db/{post_migrate => migrate}/20210125100452_migrate_search_data_after_default_locale_rename.rb (100%) rename db/{post_migrate => migrate}/20210127140730_undo_add_processed_to_notifications.rb (100%) rename db/{post_migrate => migrate}/20210207232853_fix_topic_timer_duration_minutes.rb (100%) rename db/{post_migrate => migrate}/20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb (100%) rename db/{post_migrate => migrate}/20210218022739_move_new_since_to_new_table_again.rb (100%) rename db/{post_migrate => migrate}/20210219171329_drop_old_sso_site_settings.rb (100%) rename db/{post_migrate => migrate}/20210302164429_drop_flash_onebox_site_setting.rb (100%) rename db/{post_migrate => migrate}/20210324043327_delete_orphan_post_revisions.rb (100%) rename db/{post_migrate => migrate}/20210328233843_fix_bookmarks_with_incorrect_topic_id.rb (100%) diff --git a/db/post_migrate/20210125100452_migrate_search_data_after_default_locale_rename.rb b/db/migrate/20210125100452_migrate_search_data_after_default_locale_rename.rb similarity index 100% rename from db/post_migrate/20210125100452_migrate_search_data_after_default_locale_rename.rb rename to db/migrate/20210125100452_migrate_search_data_after_default_locale_rename.rb diff --git a/db/post_migrate/20210127140730_undo_add_processed_to_notifications.rb b/db/migrate/20210127140730_undo_add_processed_to_notifications.rb similarity index 100% rename from db/post_migrate/20210127140730_undo_add_processed_to_notifications.rb rename to db/migrate/20210127140730_undo_add_processed_to_notifications.rb diff --git a/db/post_migrate/20210207232853_fix_topic_timer_duration_minutes.rb b/db/migrate/20210207232853_fix_topic_timer_duration_minutes.rb similarity index 100% rename from db/post_migrate/20210207232853_fix_topic_timer_duration_minutes.rb rename to db/migrate/20210207232853_fix_topic_timer_duration_minutes.rb diff --git a/db/post_migrate/20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb b/db/migrate/20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb similarity index 100% rename from db/post_migrate/20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb rename to db/migrate/20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb diff --git a/db/post_migrate/20210218022739_move_new_since_to_new_table_again.rb b/db/migrate/20210218022739_move_new_since_to_new_table_again.rb similarity index 100% rename from db/post_migrate/20210218022739_move_new_since_to_new_table_again.rb rename to db/migrate/20210218022739_move_new_since_to_new_table_again.rb diff --git a/db/post_migrate/20210219171329_drop_old_sso_site_settings.rb b/db/migrate/20210219171329_drop_old_sso_site_settings.rb similarity index 100% rename from db/post_migrate/20210219171329_drop_old_sso_site_settings.rb rename to db/migrate/20210219171329_drop_old_sso_site_settings.rb diff --git a/db/post_migrate/20210302164429_drop_flash_onebox_site_setting.rb b/db/migrate/20210302164429_drop_flash_onebox_site_setting.rb similarity index 100% rename from db/post_migrate/20210302164429_drop_flash_onebox_site_setting.rb rename to db/migrate/20210302164429_drop_flash_onebox_site_setting.rb diff --git a/db/post_migrate/20210324043327_delete_orphan_post_revisions.rb b/db/migrate/20210324043327_delete_orphan_post_revisions.rb similarity index 100% rename from db/post_migrate/20210324043327_delete_orphan_post_revisions.rb rename to db/migrate/20210324043327_delete_orphan_post_revisions.rb diff --git a/db/post_migrate/20210328233843_fix_bookmarks_with_incorrect_topic_id.rb b/db/migrate/20210328233843_fix_bookmarks_with_incorrect_topic_id.rb similarity index 100% rename from db/post_migrate/20210328233843_fix_bookmarks_with_incorrect_topic_id.rb rename to db/migrate/20210328233843_fix_bookmarks_with_incorrect_topic_id.rb diff --git a/script/promote_migrations b/script/promote_migrations index 5dea7f0090018..be247a90839f3 100755 --- a/script/promote_migrations +++ b/script/promote_migrations @@ -16,12 +16,13 @@ require 'fileutils' VERSION_REGEX = %r{\/(\d+)_} DRY_RUN = !!ARGV.delete('--dry-run') +PLUGINS = false if i = ARGV.find_index('--plugins-base') ARGV.delete_at(i) PLUGINS = true PLUGINS_BASE = ARGV.delete_at(i) -elsif ARV.delete('--plugins') +elsif ARGV.delete('--plugins') PLUGINS = true PLUGINS_BASE = 'plugins' end