Sha256: a781975196bb512b6d5b7a9e401c6147b71a612e507731ae8b41273994484bae

Contents?: true

Size: 361 Bytes

Versions: 27

Compression:

Stored size: 361 Bytes

Contents

class AddAuthenticationTokenToUsers < ActiveRecord::Migration
  def up
    add_column :users, :authentication_token, :string
    add_index :users, :authentication_token

    User.unscoped { User.find_each(&:ensure_authentication_token) }
  end

  def down
    remove_index :users, :authentication_token
    remove_column :users, :authentication_token
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
houston-core-0.9.2 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.9.1 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.9.0 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.9.0.rc1 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.4 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.3 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.2 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.1 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.0 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.0.pre2 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.8.0.pre db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.7.0 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.7.0.beta4 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.7.0.beta3 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.7.0.beta2 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.7.0.beta db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.6.3 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.6.2 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.6.1 db/migrate/20120826022643_add_authentication_token_to_users.rb
houston-core-0.6.0 db/migrate/20120826022643_add_authentication_token_to_users.rb