Files
forum/db/migrate/20241205162117_add_columns_to_moved_posts.rb
Mark VanLandinghamandGitHub 4614726572 DEV: Add user_id and post_user_id to MovedPost records (#30130)
Follow-up from this commit - https://github.com/discourse/discourse/commit/0b7bf5a8070f02f3ac88d79edd404e85a53367c5

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.
2024-12-05 17:10:32 -06:00

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