mixing in some sorcery auth
This commit is contained in:
19
db/migrate/20151008022535_sorcery_init.rb
Normal file
19
db/migrate/20151008022535_sorcery_init.rb
Normal file
@ -0,0 +1,19 @@
|
||||
class SorceryInit < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :people, :email, :string, null: false
|
||||
add_index :people, :email, unique: true
|
||||
add_column :people, :activation_state, :string, default: nil
|
||||
add_column :people, :activation_token, :string, default: nil
|
||||
add_column :people, :activation_token_expires_at, :datetime, default: nil
|
||||
|
||||
add_index :people, :activation_token
|
||||
|
||||
create_table :authentications do |t|
|
||||
t.integer :person_id, null: false
|
||||
t.string :provider, :uid, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :authentications, [:provider, :uid]
|
||||
end
|
||||
end
|
29
db/schema.rb
29
db/schema.rb
@ -11,7 +11,17 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150904033833) do
|
||||
ActiveRecord::Schema.define(version: 20151008022535) do
|
||||
|
||||
create_table "authentications", force: :cascade do |t|
|
||||
t.integer "person_id", limit: 4, null: false
|
||||
t.string "provider", limit: 255, null: false
|
||||
t.string "uid", limit: 255, null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "authentications", ["provider", "uid"], name: "index_authentications_on_provider_and_uid", using: :btree
|
||||
|
||||
create_table "children", force: :cascade do |t|
|
||||
t.string "first_name", limit: 255
|
||||
@ -36,14 +46,19 @@ ActiveRecord::Schema.define(version: 20150904033833) do
|
||||
add_index "parenthoods", ["person_id", "child_id"], name: "parentship", using: :btree
|
||||
|
||||
create_table "people", force: :cascade do |t|
|
||||
t.string "first_name", limit: 255
|
||||
t.string "last_name", limit: 255
|
||||
t.string "phone", limit: 255
|
||||
t.string "email", limit: 255
|
||||
t.boolean "admin"
|
||||
t.boolean "staff"
|
||||
t.string "first_name", limit: 255
|
||||
t.string "last_name", limit: 255
|
||||
t.string "phone", limit: 255
|
||||
t.string "email", limit: 255, null: false
|
||||
t.boolean "admin"
|
||||
t.boolean "staff"
|
||||
t.string "activation_state", limit: 255
|
||||
t.string "activation_token", limit: 255
|
||||
t.datetime "activation_token_expires_at"
|
||||
end
|
||||
|
||||
add_index "people", ["activation_token"], name: "index_people_on_activation_token", using: :btree
|
||||
add_index "people", ["email"], name: "index_people_on_email", unique: true, using: :btree
|
||||
add_index "people", ["phone"], name: "index_people_on_phone", using: :btree
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user