skill-assessment-app/db/migrate/20161118023249_candidate_review_system.rb

19 lines
564 B
Ruby
Raw Permalink Normal View History

2016-11-17 22:43:19 -06:00
# 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