Skip to content

A platform for community discussion. Free, open, simple.

DEV: Update add_column migration to remove transaction (#16715)

David Taylore599b5b08f43
diff --git a/db/migrate/20220505191131_add_last_seen_reviewable_id_to_user.rb b/db/migrate/20220505191131_add_last_seen_reviewable_id_to_user.rb
index 7bc50e025ef..a050ca6ef25 100644
--- a/db/migrate/20220505191131_add_last_seen_reviewable_id_to_user.rb
+++ b/db/migrate/20220505191131_add_last_seen_reviewable_id_to_user.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
class AddLastSeenReviewableIdToUser < ActiveRecord::Migration[7.0]
+ disable_ddl_transaction!
+
def change
- add_column :users, :last_seen_reviewable_id, :integer
+ add_column :users, :last_seen_reviewable_id, :integer, if_not_exists: true
end
end