20 lines
570 B
Ruby
20 lines
570 B
Ruby
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
|