11 lines
189 B
Ruby
11 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
|