You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/db/migrate/20141115172153_add_secret_t...

12 lines
330 B
Ruby

class AddSecretTokenToAsciicasts < ActiveRecord::Migration
def change
add_column :asciicasts, :secret_token, :string
Asciicast.find_each do |asciicast|
asciicast.update_attribute(:secret_token, Asciicast.generate_secret_token)
end
change_column :asciicasts, :secret_token, :string, null: false
end
end