mirror of
https://github.com/internetee/registry.git
synced 2025-07-06 11:13:27 +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
|
def up
|
||||||
add_column :users, :roles, :string, array: true
|
add_column :users, :roles, :string, array: true
|
||||||
|
|
||||||
|
User.paper_trail_off!
|
||||||
User.all.each do |x|
|
User.all.each do |x|
|
||||||
x.roles = ['admin']
|
x.roles = ['admin']
|
||||||
x.save
|
x.save
|
||||||
end
|
end
|
||||||
|
User.paper_trail_on!
|
||||||
|
|
||||||
remove_column :users, :role_id
|
remove_column :users, :role_id
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue