1
0
mirror of https://github.com/discourse/discourse.git synced 2025-03-06 11:19:51 +00:00
discourse/db/migrate/20200116140132_rename_reply_id_column.rb

17 lines
315 B
Ruby
Raw Normal View History

# 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