* create mentor relationship table and begin dashboard * add missing files from previous commit * add mentorship relationship status * remove uniqueness validation * add multiple notes * ban from mentorship deactives all relationships * add untracked files * fix logic issue and add specs * add model specs * add request specs * add request specs and fix linting * fix internal users spec * remove phantom columns * remove bizzaro character * move all attr_accessor to one line
13 lines
449 B
Ruby
13 lines
449 B
Ruby
class CreateMentorRelationships < ActiveRecord::Migration[5.1]
|
|
def change
|
|
create_table :mentor_relationships do |t|
|
|
t.integer :mentor_id, null: false
|
|
t.integer :mentee_id, null: false
|
|
t.boolean :active, default: true
|
|
t.timestamps
|
|
end
|
|
add_index :mentor_relationships, :mentee_id
|
|
add_index :mentor_relationships, :mentor_id
|
|
add_index :mentor_relationships, %i[mentee_id mentor_id], unique: true
|
|
end
|
|
end
|