# 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. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20161118023249) do create_table "answers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.integer "candidate_id" t.integer "question_id" t.text "answer", limit: 65535 t.integer "saved" t.boolean "submitted" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["candidate_id"], name: "index_answers_on_candidate_id", using: :btree t.index ["question_id"], name: "index_answers_on_question_id", using: :btree t.index ["submitted"], name: "index_answers_on_submitted", using: :btree end create_table "candidates", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.string "test_hash" t.string "name" t.string "email" t.string "experience" t.integer "recruiter_id" t.boolean "completed" t.boolean "reminded" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "quiz_id" t.integer "review_status", default: 0, null: false t.index ["quiz_id"], name: "index_candidates_on_quiz_id", using: :btree t.index ["recruiter_id"], name: "index_candidates_on_recruiter_id", using: :btree t.index ["test_hash"], name: "index_candidates_on_test_hash", unique: true, using: :btree end create_table "questions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.integer "quiz_id" t.text "question", limit: 65535 t.string "category" t.string "input_type" t.text "input_options", limit: 65535 t.string "sort" t.boolean "active" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "attachment" t.index ["active"], name: "index_questions_on_active", using: :btree t.index ["quiz_id"], name: "index_questions_on_quiz_id", using: :btree t.index ["sort"], name: "index_questions_on_sort", using: :btree end create_table "quizzes", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.string "unit" t.string "dept" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "name" end create_table "reviewer_to_quizzes", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.integer "user_id", null: false t.integer "quiz_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["quiz_id"], name: "index_reviewer_to_quizzes_on_quiz_id", using: :btree end create_table "reviewer_votes", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.integer "candidate_id" t.integer "user_id" t.integer "vote", default: 0, null: false t.integer "veto", default: 0, null: false t.datetime "last_reminded" t.boolean "locked", default: false, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["candidate_id", "user_id"], name: "index_reviewer_votes_on_candidate_id_and_user_id", unique: true, using: :btree end create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.string "name" t.string "email" t.string "password_digest" t.string "role" t.boolean "active" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "reset_token" t.datetime "reset_timestamp" t.index ["reset_token"], name: "index_users_on_reset_token", using: :btree end end