From c358151a6ce285e8cdd20acfd1514e41d28065f0 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Fri, 16 Dec 2022 13:36:30 +0200 Subject: [PATCH] DEV: Promote historic post_deploy migrations (#19492) This commit promotes all post_deploy migrations which existed in Discourse v2.8.0 (timestamp <= 20220107014925). This commit includes a fix to the promote_migrations script to promote all migrations of the first version of the previous stable version. For example, if the current stable version is v2.8.13, the version used as a cutoff for promoting migrations is v2.8.0. --- ...0210513125608_remove_length_constrain_from_topic_excerpt.rb | 0 ...210525112226_remove_length_constrain_from_topic_link_url.rb | 0 ...28003603_fix_badge_image_avatar_upload_security_and_acls.rb | 0 .../20210621234939_backfill_email_log_topic_id.rb | 0 ...4023831_remove_highest_seen_post_number_from_topic_users.rb | 0 .../20210628035905_drop_duration_column_from_topic_timers.rb | 0 ...6091905_drop_disable_jump_reply_column_from_user_options.rb | 0 .../20210709053030_drop_uploads_verified.rb | 0 .../20210802131421_remove_post_processed_trigger_option.rb | 0 .../20210909041448_make_topic_id_nullable_for_bookmarks.rb | 0 .../20210922064213_alter_bumped_at_indexes_on_topics.rb | 0 .../20211019152356_populate_pending_posts_count_column.rb | 0 .../20211124161346_queue_internal_onebox_rebake.rb | 0 .../20211201221028_migrate_email_to_normalized_email.rb | 0 .../20211206160212_drop_token_from_email_tokens.rb | 0 .../20211224010204_drop_old_bookmark_columns.rb | 0 script/promote_migrations | 3 +-- 17 files changed, 1 insertion(+), 2 deletions(-) rename db/{post_migrate => migrate}/20210513125608_remove_length_constrain_from_topic_excerpt.rb (100%) rename db/{post_migrate => migrate}/20210525112226_remove_length_constrain_from_topic_link_url.rb (100%) rename db/{post_migrate => migrate}/20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb (100%) rename db/{post_migrate => migrate}/20210621234939_backfill_email_log_topic_id.rb (100%) rename db/{post_migrate => migrate}/20210624023831_remove_highest_seen_post_number_from_topic_users.rb (100%) rename db/{post_migrate => migrate}/20210628035905_drop_duration_column_from_topic_timers.rb (100%) rename db/{post_migrate => migrate}/20210706091905_drop_disable_jump_reply_column_from_user_options.rb (100%) rename db/{post_migrate => migrate}/20210709053030_drop_uploads_verified.rb (100%) rename db/{post_migrate => migrate}/20210802131421_remove_post_processed_trigger_option.rb (100%) rename db/{post_migrate => migrate}/20210909041448_make_topic_id_nullable_for_bookmarks.rb (100%) rename db/{post_migrate => migrate}/20210922064213_alter_bumped_at_indexes_on_topics.rb (100%) rename db/{post_migrate => migrate}/20211019152356_populate_pending_posts_count_column.rb (100%) rename db/{post_migrate => migrate}/20211124161346_queue_internal_onebox_rebake.rb (100%) rename db/{post_migrate => migrate}/20211201221028_migrate_email_to_normalized_email.rb (100%) rename db/{post_migrate => migrate}/20211206160212_drop_token_from_email_tokens.rb (100%) rename db/{post_migrate => migrate}/20211224010204_drop_old_bookmark_columns.rb (100%) diff --git a/db/post_migrate/20210513125608_remove_length_constrain_from_topic_excerpt.rb b/db/migrate/20210513125608_remove_length_constrain_from_topic_excerpt.rb similarity index 100% rename from db/post_migrate/20210513125608_remove_length_constrain_from_topic_excerpt.rb rename to db/migrate/20210513125608_remove_length_constrain_from_topic_excerpt.rb diff --git a/db/post_migrate/20210525112226_remove_length_constrain_from_topic_link_url.rb b/db/migrate/20210525112226_remove_length_constrain_from_topic_link_url.rb similarity index 100% rename from db/post_migrate/20210525112226_remove_length_constrain_from_topic_link_url.rb rename to db/migrate/20210525112226_remove_length_constrain_from_topic_link_url.rb diff --git a/db/post_migrate/20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb b/db/migrate/20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb similarity index 100% rename from db/post_migrate/20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb rename to db/migrate/20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb diff --git a/db/post_migrate/20210621234939_backfill_email_log_topic_id.rb b/db/migrate/20210621234939_backfill_email_log_topic_id.rb similarity index 100% rename from db/post_migrate/20210621234939_backfill_email_log_topic_id.rb rename to db/migrate/20210621234939_backfill_email_log_topic_id.rb diff --git a/db/post_migrate/20210624023831_remove_highest_seen_post_number_from_topic_users.rb b/db/migrate/20210624023831_remove_highest_seen_post_number_from_topic_users.rb similarity index 100% rename from db/post_migrate/20210624023831_remove_highest_seen_post_number_from_topic_users.rb rename to db/migrate/20210624023831_remove_highest_seen_post_number_from_topic_users.rb diff --git a/db/post_migrate/20210628035905_drop_duration_column_from_topic_timers.rb b/db/migrate/20210628035905_drop_duration_column_from_topic_timers.rb similarity index 100% rename from db/post_migrate/20210628035905_drop_duration_column_from_topic_timers.rb rename to db/migrate/20210628035905_drop_duration_column_from_topic_timers.rb diff --git a/db/post_migrate/20210706091905_drop_disable_jump_reply_column_from_user_options.rb b/db/migrate/20210706091905_drop_disable_jump_reply_column_from_user_options.rb similarity index 100% rename from db/post_migrate/20210706091905_drop_disable_jump_reply_column_from_user_options.rb rename to db/migrate/20210706091905_drop_disable_jump_reply_column_from_user_options.rb diff --git a/db/post_migrate/20210709053030_drop_uploads_verified.rb b/db/migrate/20210709053030_drop_uploads_verified.rb similarity index 100% rename from db/post_migrate/20210709053030_drop_uploads_verified.rb rename to db/migrate/20210709053030_drop_uploads_verified.rb diff --git a/db/post_migrate/20210802131421_remove_post_processed_trigger_option.rb b/db/migrate/20210802131421_remove_post_processed_trigger_option.rb similarity index 100% rename from db/post_migrate/20210802131421_remove_post_processed_trigger_option.rb rename to db/migrate/20210802131421_remove_post_processed_trigger_option.rb diff --git a/db/post_migrate/20210909041448_make_topic_id_nullable_for_bookmarks.rb b/db/migrate/20210909041448_make_topic_id_nullable_for_bookmarks.rb similarity index 100% rename from db/post_migrate/20210909041448_make_topic_id_nullable_for_bookmarks.rb rename to db/migrate/20210909041448_make_topic_id_nullable_for_bookmarks.rb diff --git a/db/post_migrate/20210922064213_alter_bumped_at_indexes_on_topics.rb b/db/migrate/20210922064213_alter_bumped_at_indexes_on_topics.rb similarity index 100% rename from db/post_migrate/20210922064213_alter_bumped_at_indexes_on_topics.rb rename to db/migrate/20210922064213_alter_bumped_at_indexes_on_topics.rb diff --git a/db/post_migrate/20211019152356_populate_pending_posts_count_column.rb b/db/migrate/20211019152356_populate_pending_posts_count_column.rb similarity index 100% rename from db/post_migrate/20211019152356_populate_pending_posts_count_column.rb rename to db/migrate/20211019152356_populate_pending_posts_count_column.rb diff --git a/db/post_migrate/20211124161346_queue_internal_onebox_rebake.rb b/db/migrate/20211124161346_queue_internal_onebox_rebake.rb similarity index 100% rename from db/post_migrate/20211124161346_queue_internal_onebox_rebake.rb rename to db/migrate/20211124161346_queue_internal_onebox_rebake.rb diff --git a/db/post_migrate/20211201221028_migrate_email_to_normalized_email.rb b/db/migrate/20211201221028_migrate_email_to_normalized_email.rb similarity index 100% rename from db/post_migrate/20211201221028_migrate_email_to_normalized_email.rb rename to db/migrate/20211201221028_migrate_email_to_normalized_email.rb diff --git a/db/post_migrate/20211206160212_drop_token_from_email_tokens.rb b/db/migrate/20211206160212_drop_token_from_email_tokens.rb similarity index 100% rename from db/post_migrate/20211206160212_drop_token_from_email_tokens.rb rename to db/migrate/20211206160212_drop_token_from_email_tokens.rb diff --git a/db/post_migrate/20211224010204_drop_old_bookmark_columns.rb b/db/migrate/20211224010204_drop_old_bookmark_columns.rb similarity index 100% rename from db/post_migrate/20211224010204_drop_old_bookmark_columns.rb rename to db/migrate/20211224010204_drop_old_bookmark_columns.rb diff --git a/script/promote_migrations b/script/promote_migrations index be247a90839..2aed064ada3 100755 --- a/script/promote_migrations +++ b/script/promote_migrations @@ -48,8 +48,7 @@ puts "Current stable version is #{current_stable_version}" minor = current_stable_version[/^(v\d+\.\d+)\./, 1] -previous_stable_version = - run "git describe --abbrev=0 --match 'v*' --exclude '#{minor}*' origin/stable" +previous_stable_version = "#{minor}.0" puts "Previous stable version is #{previous_stable_version}" stable_post_migrate_filenames =