Use update_column to avoid cached column lookup

pull/10161/head
Oliver Günther 3 years ago
parent 1ca8ead759
commit eac4d06e56
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 4
      db/migrate/20210427065703_make_system_user_admin.rb

@ -1,9 +1,9 @@
class MakeSystemUserAdmin < ActiveRecord::Migration[6.1]
def up
User.system.update_attribute(:admin, true)
User.system.update_column(:admin, true)
end
def down
User.system.update_attribute(:admin, false)
User.system.update_column(:admin, false)
end
end

Loading…
Cancel
Save