Sha256: fc9e3e090f8a19ea16c64c96291e7e815e1fd025974a4a0b188bacc41c3a4268

Contents?: true

Size: 658 Bytes

Versions: 25

Compression:

Stored size: 658 Bytes

Contents

class AddAuthenticationToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :username,         :string  # for user identification
    add_column :users, :password_digest,  :string

    add_column :users, :email,            :string  # for forgotten-credentials
    add_column :users, :token,            :string  # for forgotten-credentials
    add_column :users, :token_created_at, :string  # for forgotten-credentials
  end

  def self.down
    remove_column :users, :username
    remove_column :users, :password_digest
    remove_column :users, :email
    remove_column :users, :token
    remove_column :users, :token_created_at
  end
end

Version data entries

25 entries across 19 versions & 1 rubygems

Version Path
quo_vadis-1.4.2 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.4.1 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.4.0 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.3.2 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.3.1 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.3.0 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.2.3 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.2.2 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.2.1 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.2.0 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.1.2 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.1.1 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.1.0 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.0.7 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.0.7 lib/generators/quo_vadis/templates/migration.rb
quo_vadis-1.0.6 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.0.6 lib/generators/quo_vadis/templates/migration.rb
quo_vadis-1.0.5 lib/generators/quo_vadis/templates/migration.rb
quo_vadis-1.0.5 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb
quo_vadis-1.0.4 test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb