tap/db/migrate/20190408122720_add_api_token.rb

11 lines
185 B
Ruby
Raw Normal View History

2019-04-08 16:41:19 +02:00
class AddApiToken < ActiveRecord::Migration
def change
add_column :users, :userkey, :string
User.all.each do |user|
user.generate_key
user.save
end
end
end