This gives us more flexibility and allows us to use password authentication later. Also we don't need to build the login functionality ourself.
90 lines
3.4 KiB
Ruby
90 lines
3.4 KiB
Ruby
# This file is auto-generated from the current state of the database. Instead
|
|
# of editing this file, please use the migrations feature of Active Record to
|
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
#
|
|
# This file is the source Rails uses to define your schema when running `rails
|
|
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
|
# be faster and is potentially less error prone than running all of your
|
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
# migrations use external dependencies or application code.
|
|
#
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
ActiveRecord::Schema.define(version: 2020_04_13_101920) do
|
|
|
|
# These are extensions that must be enabled in order to support this database
|
|
enable_extension "plpgsql"
|
|
|
|
create_table "active_storage_attachments", force: :cascade do |t|
|
|
t.string "name", null: false
|
|
t.string "record_type", null: false
|
|
t.bigint "record_id", null: false
|
|
t.bigint "blob_id", null: false
|
|
t.datetime "created_at", null: false
|
|
t.string "token"
|
|
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
|
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
|
t.index ["token"], name: "index_active_storage_attachments_on_token", unique: true
|
|
end
|
|
|
|
create_table "active_storage_blobs", force: :cascade do |t|
|
|
t.string "key", null: false
|
|
t.string "filename", null: false
|
|
t.string "content_type"
|
|
t.text "metadata"
|
|
t.bigint "byte_size", null: false
|
|
t.string "checksum", null: false
|
|
t.datetime "created_at", null: false
|
|
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
|
end
|
|
|
|
create_table "authentications", force: :cascade do |t|
|
|
t.integer "user_id"
|
|
t.datetime "expires_at"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.text "access_token_ciphertext"
|
|
t.text "refresh_token_ciphertext"
|
|
t.string "provider"
|
|
t.string "uid"
|
|
end
|
|
|
|
create_table "forms", force: :cascade do |t|
|
|
t.integer "user_id"
|
|
t.string "google_spreadsheet_id"
|
|
t.string "title"
|
|
t.string "token"
|
|
t.string "thank_you_url"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
end
|
|
|
|
create_table "submissions", force: :cascade do |t|
|
|
t.integer "form_id"
|
|
t.json "data", default: {}
|
|
t.datetime "appended_at"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.string "remote_ip"
|
|
t.string "referrer"
|
|
t.integer "sequential_id"
|
|
end
|
|
|
|
create_table "users", force: :cascade do |t|
|
|
t.string "email"
|
|
t.string "name"
|
|
t.string "google_id"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.string "crypted_password"
|
|
t.string "salt"
|
|
t.string "magic_login_token"
|
|
t.datetime "magic_login_token_expires_at"
|
|
t.datetime "magic_login_email_sent_at"
|
|
t.index ["email"], name: "index_users_on_email", unique: true
|
|
t.index ["magic_login_token"], name: "index_users_on_magic_login_token"
|
|
end
|
|
|
|
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
|
end
|