Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save johnhamelink/d4b2da980fdf3cadbbbf to your computer and use it in GitHub Desktop.

Select an option

Save johnhamelink/d4b2da980fdf3cadbbbf to your computer and use it in GitHub Desktop.
class DeviseCreateSessions < ActiveRecord::Migration
def change
create_table(:sessions) do |t|
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
t.string :reset_password_token
t.datetime :reset_password_sent_at
t.datetime :remember_created_at
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.inet :current_sign_in_ip
t.inet :last_sign_in_ip
t.string :type
t.string :facebook_token
t.text :address
t.string :postcode
t.timestamps null: false
end
add_index :sessions, :email, unique: true
add_index :sessions, :reset_password_token, unique: true
add_index :sessions, :type
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment