Skip to content

Instantly share code, notes, and snippets.

@bufordtaylor
Created February 25, 2016 17:23
Show Gist options
  • Save bufordtaylor/6697fb505defdbda10e9 to your computer and use it in GitHub Desktop.
Save bufordtaylor/6697fb505defdbda10e9 to your computer and use it in GitHub Desktop.
class CreateAdminDoppelgangerSession < ActiveRecord::Migration
def change
create_table :admin_doppelganger_sessions do |t|
t.integer "admin_user_id", null: false
t.references :user
t.boolean "active", default: true
t.date "logout_date"
t.string "token", null: false
t.string "return_to"
t.timestamps
end
add_index :admin_doppelganger_sessions, :token
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment