mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't cause exceptions due to rename of reply_id column
This syncs the value of the `reply_id` column into the `reply_post_id` column until all servers have been deployed and the post migrations ran.
Follow-up to ab07b945c2
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MakePostReplyIdColumnReadOnly < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
Migration::ColumnDropper.mark_readonly(:post_replies, :reply_id)
|
||||
DB.exec("DROP FUNCTION IF EXISTS post_replies_sync_reply_id() CASCADE")
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user