Sha256: 1ccc39b3133b56cf88e664a0c2fd8e57b829d849daba3b12c51b8c1a8c521e56

Contents?: true

Size: 853 Bytes

Versions: 18

Compression:

Stored size: 853 Bytes

Contents

class SunriseCreateUsers < ActiveRecord::Migration
  def self.up
    create_table(:users) do |t|
      t.string :name, :limit => 150
      # t.string :login, :limit => 20, :null => false
      
      t.database_authenticatable :null => false
      t.recoverable
      t.rememberable
      t.trackable
      t.confirmable
      t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :time
      t.encryptable
      # t.token_authenticatable

      t.timestamps
    end
    
    add_index :users, :email,                :unique => true
    add_index :users, :reset_password_token, :unique => true
    add_index :users, :confirmation_token,   :unique => true
    # add_index :users, :login,                :unique => true
    # add_index :users, :unlock_token,         :unique => true    
  end

  def self.down
    drop_table :users
  end
end

Version data entries

18 entries across 13 versions & 4 rubygems

Version Path
sunrise-core-0.2.2 spec/dummy/db/migrate/20110616102556_sunrise_create_users.rb
sunrise-core-0.2.2 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.2.1 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.2.1 spec/tmp/db/migrate/20110819144550_sunrise_create_users.rb
sunrise-core-0.2.1 spec/dummy/db/migrate/20110616102556_sunrise_create_users.rb
sunrise-widgets-0.1.1 spec/dummy/db/migrate/20110801124809_sunrise_create_users.rb
sunrise-locales-0.1.0 spec/dummy/db/migrate/20110801124809_sunrise_create_users.rb
sunrise-core-0.2.0 spec/dummy/db/migrate/20110616102556_sunrise_create_users.rb
sunrise-core-0.2.0 spec/tmp/db/migrate/20110819144550_sunrise_create_users.rb
sunrise-core-0.2.0 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-widgets-0.1.0 spec/dummy/db/migrate/20110801124809_sunrise_create_users.rb
sunrise-questions-0.1.0 spec/dummy/db/migrate/20110801124809_sunrise_create_users.rb
sunrise-core-0.1.5 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.1.4 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.1.3 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.1.2 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.1.1 lib/generators/sunrise/templates/migrate/create_users.rb
sunrise-core-0.1.0 lib/generators/sunrise/templates/migrate/create_users.rb