ecole_eft_app/db/migrate/20110929085855_create_qa_auth_admins.rb
2013-02-13 01:14:30 +01:00

37 lines
975 B
Ruby

class CreateQaAuthAdmins < ActiveRecord::Migration
def self.up
create_table :admins do |t|
t.string :email, :null => false, :default => ""
t.string :encrypted_password, :null => false, :default => ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, :default => 0
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
t.string :username
t.string :surname
t.string :firstname
t.integer :roles_mask
t.timestamps
end
Admin.create(:email => "n.bally@quartz-agence.com", :username => "quartz", :surname => "Bally", :firstname => "Nicolas", :password => "123456", :password_confirmation => "123456")
end
def self.down
drop_table :admins
end
end