This issue focuses on creating and updating migrations for models (Course, Evaluation, Project, Team, User) and establishing the necessary join tables (CourseRegistrations and TeamMemberships).
Migrations
Courses
Create the CourseModel with the fields title (ex. "Software Process"), code (ex. "SOEN 341").
# Example Migration for Courses
class CreateCourses < ActiveRecord::Migration[6.0]
def change
create_table :courses do |t|
t.string :title, null: false
t.references :instructor, null: false, foreign_key: { to_table: :users }
t.timestamps
end
add_index :courses, :instructor_id
end
end
Evaluations
drop student_id
add evaluator_id, and evaluatee_id
Projects
drop team_id, and instructor_id
add course_id
Teams
drop course_name, and instructor_id
add description, and project_id
Users
drop team_id, and instructor_id
CourseRegistrations
create CourseRegistrations join table with foreign keys user_id, and course_id
TeamMemberships
create TeamMemberships join table with foreign keys team_id, and user_id
Description
This issue focuses on creating and updating migrations for models (
Course
,Evaluation
,Project
,Team
,User
) and establishing the necessary join tables (CourseRegistrations
andTeamMemberships
).Migrations
Courses
Create the CourseModel with the fields
title
(ex. "Software Process"),code
(ex. "SOEN 341").Evaluations
student_id
evaluator_id
, andevaluatee_id
Projects
team_id
, andinstructor_id
course_id
Teams
course_name
, andinstructor_id
description
, andproject_id
Users
team_id
, andinstructor_id
CourseRegistrations
user_id
, andcourse_id
TeamMemberships
team_id
, anduser_id