db work
This commit is contained in:
18
db/migrate/20161118023249_candidate_review_system.rb
Normal file
18
db/migrate/20161118023249_candidate_review_system.rb
Normal file
@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
class CandidateReviewSystem < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :reviewer_votes 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.timestamps
|
||||
end
|
||||
add_index :reviewer_votes, [:candidate_id, :user_id], unique: true
|
||||
|
||||
add_column :candidates, :review_status, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
19
db/schema.rb
19
db/schema.rb
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20160915164450) do
|
||||
ActiveRecord::Schema.define(version: 20161118023249) do
|
||||
|
||||
create_table "answers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
||||
t.integer "candidate_id"
|
||||
@ -33,9 +33,10 @@ ActiveRecord::Schema.define(version: 20160915164450) do
|
||||
t.integer "recruiter_id"
|
||||
t.boolean "completed"
|
||||
t.boolean "reminded"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
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
|
||||
@ -73,6 +74,18 @@ ActiveRecord::Schema.define(version: 20160915164450) do
|
||||
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"
|
||||
|
Reference in New Issue
Block a user