adopt-a-hydrant/db/migrate/20110223180520_devise_creat...

24 lines
554 B
Ruby

class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.timestamps
t.string :name, :null => false
t.string :organization
t.string :email, :null => false
t.integer :voice_number
t.integer :sms_number
t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
end
add_index :users, :email, :unique => true
add_index :users, :reset_password_token, :unique => true
end
def self.down
drop_table :users
end
end