Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use update_column to avoid cached column lookup

Oliver Günthereac4d06e56dc
diff --git a/db/migrate/20210427065703_make_system_user_admin.rb b/db/migrate/20210427065703_make_system_user_admin.rb
index d5c4573ab6c..262b7818618 100644
--- a/db/migrate/20210427065703_make_system_user_admin.rb
+++ b/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