mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 02:56:22 +00:00
12 lines
251 B
Ruby
12 lines
251 B
Ruby
class AddTokenToRoles < ActiveRecord::Migration[6.1]
|
|
def up
|
|
add_column :roles, :token, :string
|
|
Rol.find_each do |m|
|
|
m.update_column( :token, SecureRandom.hex(64) )
|
|
end
|
|
end
|
|
|
|
def down
|
|
remove_column :roles, :token
|
|
end
|
|
end
|