mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 06:03:45 +08:00
71bec686a2
Follow-up from this commit - 9b8af0ea9f
Adds helpful data into MovedPost records for later lookup. ALSO fixes notifications for freeze_original to point to the newly created post, not the moved post.
12 lines
402 B
Ruby
12 lines
402 B
Ruby
# frozen_string_literal: true
|
|
class AddColumnsToMovedPosts < ActiveRecord::Migration[7.2]
|
|
def change
|
|
add_column :moved_posts, :old_topic_title, :string
|
|
add_column :moved_posts, :post_user_id, :integer
|
|
add_column :moved_posts, :user_id, :integer
|
|
|
|
# Index for querying moved_posts for post author given a new topic ID
|
|
add_index :moved_posts, %i[new_topic_id post_user_id]
|
|
end
|
|
end
|