tab/db/migrate/20180620161021_add_token_to_user.rb
2018-06-20 18:51:17 +02:00

10 lines
189 B
Ruby

class AddTokenToUser < ActiveRecord::Migration[5.2]
def change
add_column :users, :key, :string
User.all.each do |user|
user.generate_key
user.save
end
end
end