tap/db/migrate/20141208200510_devise_create_admins.rb

21 lines
570 B
Ruby
Raw Normal View History

2014-12-09 07:05:30 +01:00
class DeviseCreateAdmins < ActiveRecord::Migration
def change
create_table(:admins) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Trackable
t.integer :sign_in_count, default: 0, null: false
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.timestamps
end
add_index :admins, :email, unique: true
end
end