Class: CreateUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/branston/db/migrate/20091127114237_create_users.rb

Class Method Summary collapse

Class Method Details

.downObject



19
20
21
# File 'lib/branston/db/migrate/20091127114237_create_users.rb', line 19

def self.down
  drop_table "users"
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/branston/db/migrate/20091127114237_create_users.rb', line 2

def self.up
  create_table "users", :force => true do |t|
    t.column :login,                     :string, :limit => 40
    t.column :name,                      :string, :limit => 100, :default => '', :null => true
    t.column :email,                     :string, :limit => 100
    t.column :crypted_password,          :string, :limit => 40
    t.column :salt,                      :string, :limit => 40
    t.column :created_at,                :datetime
    t.column :updated_at,                :datetime
    t.column :remember_token,            :string, :limit => 40
    t.column :remember_token_expires_at, :datetime


  end
  add_index :users, :login, :unique => true
end