2014-11-15 17:46:46 +00:00
|
|
|
class AddSecretTokenToAsciicasts < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
add_column :asciicasts, :secret_token, :string
|
|
|
|
|
|
|
|
Asciicast.find_each do |asciicast|
|
2014-11-15 23:41:14 +00:00
|
|
|
asciicast.update_attribute(:secret_token, Asciicast.generate_secret_token)
|
2014-11-15 17:46:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
change_column :asciicasts, :secret_token, :string, null: false
|
|
|
|
end
|
|
|
|
end
|