5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 19:36:21 +00:00
panel/db/migrate/20230731195050_add_token_to_roles.rb

7 lines
188 B
Ruby
Raw Normal View History

class AddTokenToRoles < ActiveRecord::Migration[6.1]
def change
add_column :roles, :token, :text
Rol.find_each { |m| m.update_column( :token, SecureRandom.hex(64) ) }
end
end