mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 20:13:43 +08:00
17 lines
315 B
Ruby
17 lines
315 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class RenameReplyIdColumn < ActiveRecord::Migration[6.0]
|
||
|
def up
|
||
|
add_column :post_replies, :reply_post_id, :integer
|
||
|
|
||
|
execute <<~SQL
|
||
|
UPDATE post_replies
|
||
|
SET reply_post_id = reply_id
|
||
|
SQL
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
raise ActiveRecord::IrreversibleMigration
|
||
|
end
|
||
|
end
|