mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:22 +08:00
8040b95e8c
This commit is a redo of2f1ddadff7dd47f824070c8a3f633f00a27aacde which we reverted because it blew up an internal CI check. I looked into it, and it happened because the old migration to add the bookmark columns still existed, and those columns were dropped in a post migrate, so the two migrations to add the columns were conflicting before the post migrate was run. ------ This commit only includes the creation of the new columns and index, and does not add any triggers, backfilling, or new data. A backfill will be done in the final PR when we switch this over. Intermediate PRs will look something like this: Add an experimental site setting for using polymorphic bookmarks, and make sure in the places where bookmarks are created or updated we fill in the columns. This setting will be used in subsequent PRs as well. Listing and searching bookmarks based on polymorphic associations Creating post and topic bookmarks using polymorphic associations, and changing special for_topic logic to just rely on the Topic bookmarkable_type Querying bookmark reminders based on polymorphic associations Make sure various other areas like importers, bookmark guardian, and others all rely on the associations Prepare plugins that rely on the Bookmark model to use polymorphic associations The final core PR will remove all the setting gates and switch over to using the polymorphic associations, backfill the bookmarks table columns, and ignore the old post_id and for_topic colummns. Then it will just be a matter of dropping the old columns down the line. |
||
---|---|---|
.. | ||
20210125100452_migrate_search_data_after_default_locale_rename.rb | ||
20210127140730_undo_add_processed_to_notifications.rb | ||
20210207232853_fix_topic_timer_duration_minutes.rb | ||
20210215231312_fix_group_flair_avatar_upload_security_and_acls.rb | ||
20210218022739_move_new_since_to_new_table_again.rb | ||
20210219171329_drop_old_sso_site_settings.rb | ||
20210302164429_drop_flash_onebox_site_setting.rb | ||
20210324043327_delete_orphan_post_revisions.rb | ||
20210328233843_fix_bookmarks_with_incorrect_topic_id.rb | ||
20210513125608_remove_length_constrain_from_topic_excerpt.rb | ||
20210525112226_remove_length_constrain_from_topic_link_url.rb | ||
20210528003603_fix_badge_image_avatar_upload_security_and_acls.rb | ||
20210621234939_backfill_email_log_topic_id.rb | ||
20210624023831_remove_highest_seen_post_number_from_topic_users.rb | ||
20210628035905_drop_duration_column_from_topic_timers.rb | ||
20210706091905_drop_disable_jump_reply_column_from_user_options.rb | ||
20210709053030_drop_uploads_verified.rb | ||
20210802131421_remove_post_processed_trigger_option.rb | ||
20210909041448_make_topic_id_nullable_for_bookmarks.rb | ||
20210922064213_alter_bumped_at_indexes_on_topics.rb | ||
20211019152356_populate_pending_posts_count_column.rb | ||
20211124161346_queue_internal_onebox_rebake.rb | ||
20211201221028_migrate_email_to_normalized_email.rb | ||
20211206160212_drop_token_from_email_tokens.rb | ||
20211224010204_drop_old_bookmark_columns.rb | ||
20220202223955_migrate_selectable_avatars_enabled.rb | ||
20220214224506_reset_custom_emoji_post_bakes_version_secure_fix.rb | ||
20220215015538_drop_user_stat_count_constraints.rb | ||
20220220234155_conform_bounce_error_code.rb | ||
20220302171443_rebake_old_avatar_service_urls.rb |