diff --git a/db/migrate/20170228161543_add_comments_to_candidate.rb b/db/migrate/20170228161543_add_comments_to_candidate.rb new file mode 100644 index 0000000..960f178 --- /dev/null +++ b/db/migrate/20170228161543_add_comments_to_candidate.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true +class AddCommentsToCandidate < ActiveRecord::Migration[5.0] + def change + add_column :candidates, :review_comments, :text, after: :review_status + end +end diff --git a/db/migrate/20170228161729_remove_last_reminded_from_reviewer_votes.rb b/db/migrate/20170228161729_remove_last_reminded_from_reviewer_votes.rb new file mode 100644 index 0000000..1631176 --- /dev/null +++ b/db/migrate/20170228161729_remove_last_reminded_from_reviewer_votes.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true +class RemoveLastRemindedFromReviewerVotes < ActiveRecord::Migration[5.0] + def change + remove_column :reviewer_votes, :last_reminded, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index ddc3263..243d9ea 100644 --- a/db/schema.rb +++ b/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: 20170227154554) do +ActiveRecord::Schema.define(version: 20170228161729) do create_table "answers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.integer "candidate_id" @@ -37,10 +37,11 @@ ActiveRecord::Schema.define(version: 20170227154554) do t.boolean "completed" t.datetime "completed_at" 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.integer "review_status", default: 0, null: false + t.text "review_comments", limit: 65535 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 @@ -89,11 +90,10 @@ ActiveRecord::Schema.define(version: 20170227154554) do 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.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "vote", default: 0, null: false + t.integer "veto", default: 0, 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 diff --git a/test/fixtures/candidates.yml b/test/fixtures/candidates.yml index 46608f7..d298cc5 100644 --- a/test/fixtures/candidates.yml +++ b/test/fixtures/candidates.yml @@ -79,6 +79,7 @@ richard: # Richard has completed AND submitted the test reminded: false test_hash: 6NjnourLE6Y review_status: 1 + review_comments: "Some reasons why or why not, but here they are." juan: # Juan has chosen "finish later" for live coders name: Juan Campbell @@ -107,6 +108,7 @@ stacy: # Stacy has completed AND submitted the test reminded: false test_hash: s6oFExZliYYFx review_status: 2 + review_comments: "Some reasons why or why not, but here they are." henry: # Henry has completed AND submitted the test name: Henry Butler