);
}
diff --git a/prisma/migrations/20241108165116_section_attribute_change/migration.sql b/prisma/migrations/20241108165116_section_attribute_change/migration.sql
new file mode 100644
index 0000000..9dee958
--- /dev/null
+++ b/prisma/migrations/20241108165116_section_attribute_change/migration.sql
@@ -0,0 +1,29 @@
+/*
+ Warnings:
+
+ - You are about to drop the column `courseId` on the `sectionAttribute` table. All the data in the column will be lost.
+
+*/
+-- DropForeignKey
+ALTER TABLE "sectionAttribute" DROP CONSTRAINT "sectionAttribute_courseId_fkey";
+
+-- AlterTable
+ALTER TABLE "sectionAttribute" DROP COLUMN "courseId";
+
+-- CreateTable
+CREATE TABLE "_CourseTosectionAttribute" (
+ "A" INTEGER NOT NULL,
+ "B" INTEGER NOT NULL
+);
+
+-- CreateIndex
+CREATE UNIQUE INDEX "_CourseTosectionAttribute_AB_unique" ON "_CourseTosectionAttribute"("A", "B");
+
+-- CreateIndex
+CREATE INDEX "_CourseTosectionAttribute_B_index" ON "_CourseTosectionAttribute"("B");
+
+-- AddForeignKey
+ALTER TABLE "_CourseTosectionAttribute" ADD CONSTRAINT "_CourseTosectionAttribute_A_fkey" FOREIGN KEY ("A") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "_CourseTosectionAttribute" ADD CONSTRAINT "_CourseTosectionAttribute_B_fkey" FOREIGN KEY ("B") REFERENCES "sectionAttribute"("id") ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/prisma/migrations/20241108165432_section_attribute_change1/migration.sql b/prisma/migrations/20241108165432_section_attribute_change1/migration.sql
new file mode 100644
index 0000000..0ddcccc
--- /dev/null
+++ b/prisma/migrations/20241108165432_section_attribute_change1/migration.sql
@@ -0,0 +1,20 @@
+/*
+ Warnings:
+
+ - You are about to drop the `_CourseTosectionAttribute` table. If the table is not empty, all the data it contains will be lost.
+
+*/
+-- DropForeignKey
+ALTER TABLE "_CourseTosectionAttribute" DROP CONSTRAINT "_CourseTosectionAttribute_A_fkey";
+
+-- DropForeignKey
+ALTER TABLE "_CourseTosectionAttribute" DROP CONSTRAINT "_CourseTosectionAttribute_B_fkey";
+
+-- AlterTable
+ALTER TABLE "sectionAttribute" ADD COLUMN "courseId" INTEGER;
+
+-- DropTable
+DROP TABLE "_CourseTosectionAttribute";
+
+-- AddForeignKey
+ALTER TABLE "sectionAttribute" ADD CONSTRAINT "sectionAttribute_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course"("id") ON DELETE SET NULL ON UPDATE CASCADE;
diff --git a/prisma/migrations/20241108170518_section_attribute_change1/migration.sql b/prisma/migrations/20241108170518_section_attribute_change1/migration.sql
new file mode 100644
index 0000000..3760707
--- /dev/null
+++ b/prisma/migrations/20241108170518_section_attribute_change1/migration.sql
@@ -0,0 +1,14 @@
+/*
+ Warnings:
+
+ - Made the column `courseId` on table `sectionAttribute` required. This step will fail if there are existing NULL values in that column.
+
+*/
+-- DropForeignKey
+ALTER TABLE "sectionAttribute" DROP CONSTRAINT "sectionAttribute_courseId_fkey";
+
+-- AlterTable
+ALTER TABLE "sectionAttribute" ALTER COLUMN "courseId" SET NOT NULL;
+
+-- AddForeignKey
+ALTER TABLE "sectionAttribute" ADD CONSTRAINT "sectionAttribute_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index dd24487..98731af 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -99,7 +99,7 @@ model sectionAttribute {
code String
description String
courseReferenceNumber String @unique
- courseId Int?
+ courseId Int
Course Course? @relation(fields: [courseId], references: [id])
year String
}