discourse/db/migrate/20241205162117_add_columns_to_moved_posts.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
402 B
Ruby
Raw Normal View History

# 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