From 5a32c5d782b737ff4ccddc4b0984ac15b089e13f Mon Sep 17 00:00:00 2001 From: Damian <37555910+DCRepublic@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:59:46 -0500 Subject: [PATCH] DB fix attempt 3 - optional everything in Rating --- .../migration.sql | 9 +++++++++ prisma/schema.prisma | 16 ++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 prisma/migrations/20241127035839_stage1_optional_everything_in_rating/migration.sql diff --git a/prisma/migrations/20241127035839_stage1_optional_everything_in_rating/migration.sql b/prisma/migrations/20241127035839_stage1_optional_everything_in_rating/migration.sql new file mode 100644 index 0000000..d426bd0 --- /dev/null +++ b/prisma/migrations/20241127035839_stage1_optional_everything_in_rating/migration.sql @@ -0,0 +1,9 @@ +-- AlterTable +ALTER TABLE "Rating" ALTER COLUMN "courseName" DROP NOT NULL, +ALTER COLUMN "courseNumber" DROP NOT NULL, +ALTER COLUMN "courseSubject" DROP NOT NULL, +ALTER COLUMN "profBannerId" DROP NOT NULL, +ALTER COLUMN "profDisplayName" DROP NOT NULL, +ALTER COLUMN "termTaken" DROP NOT NULL, +ALTER COLUMN "yearTaken" DROP NOT NULL, +ALTER COLUMN "profUid" DROP NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e729855..d17394f 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -111,14 +111,14 @@ model sectionAttribute { model Rating { id Int @id @default(autoincrement()) - courseSubject String - courseNumber String - courseName String - profDisplayName String - profBannerId String - yearTaken Int - termTaken String - profUid String + courseSubject String? + courseNumber String? + courseName String? + profDisplayName String? + profBannerId String? + yearTaken Int? + termTaken String? + profUid String? overallRating Int? difficulty Int? takeAgain Boolean?