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
|
Reference in New Issue
Block a user