mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 18:53:26 +02:00
Turn off paper trail for temp
This commit is contained in:
parent
83fa666fbf
commit
c0a0691470
1 changed files with 2 additions and 0 deletions
|
@ -2,10 +2,12 @@ class RefactorRoles < ActiveRecord::Migration
|
|||
def up
|
||||
add_column :users, :roles, :string, array: true
|
||||
|
||||
User.paper_trail_off!
|
||||
User.all.each do |x|
|
||||
x.roles = ['admin']
|
||||
x.save
|
||||
end
|
||||
User.paper_trail_on!
|
||||
|
||||
remove_column :users, :role_id
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue