This commit is contained in:
Mark Moser
2016-11-17 22:43:19 -06:00
parent 85674b40a6
commit 37aa17ec1f
9 changed files with 451 additions and 3 deletions

View 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