-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d2f6be
commit f655fa9
Showing
7 changed files
with
156 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `facultyId` on the `Course` table. All the data in the column will be lost. | ||
- You are about to drop the column `facultyMeetId` on the `Course` table. All the data in the column will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "Course" DROP CONSTRAINT "Course_facultyId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "Course" DROP CONSTRAINT "Course_facultyMeetId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Course" DROP COLUMN "facultyId", | ||
DROP COLUMN "facultyMeetId"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "_CourseToFaculty" ( | ||
"A" INTEGER NOT NULL, | ||
"B" INTEGER NOT NULL | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "_CourseToMeetingsFaculty" ( | ||
"A" INTEGER NOT NULL, | ||
"B" INTEGER NOT NULL | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "_CourseToFaculty_AB_unique" ON "_CourseToFaculty"("A", "B"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "_CourseToFaculty_B_index" ON "_CourseToFaculty"("B"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "_CourseToMeetingsFaculty_AB_unique" ON "_CourseToMeetingsFaculty"("A", "B"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "_CourseToMeetingsFaculty_B_index" ON "_CourseToMeetingsFaculty"("B"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "_CourseToFaculty" ADD CONSTRAINT "_CourseToFaculty_A_fkey" FOREIGN KEY ("A") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "_CourseToFaculty" ADD CONSTRAINT "_CourseToFaculty_B_fkey" FOREIGN KEY ("B") REFERENCES "Faculty"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "_CourseToMeetingsFaculty" ADD CONSTRAINT "_CourseToMeetingsFaculty_A_fkey" FOREIGN KEY ("A") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "_CourseToMeetingsFaculty" ADD CONSTRAINT "_CourseToMeetingsFaculty_B_fkey" FOREIGN KEY ("B") REFERENCES "MeetingsFaculty"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `_CourseToFaculty` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `_CourseToMeetingsFaculty` table. If the table is not empty, all the data it contains will be lost. | ||
- Added the required column `facultyId` to the `Course` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `facultyMeetId` to the `Course` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "_CourseToFaculty" DROP CONSTRAINT "_CourseToFaculty_A_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "_CourseToFaculty" DROP CONSTRAINT "_CourseToFaculty_B_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "_CourseToMeetingsFaculty" DROP CONSTRAINT "_CourseToMeetingsFaculty_A_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "_CourseToMeetingsFaculty" DROP CONSTRAINT "_CourseToMeetingsFaculty_B_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Course" ADD COLUMN "facultyId" INTEGER NOT NULL, | ||
ADD COLUMN "facultyMeetId" INTEGER NOT NULL; | ||
|
||
-- DropTable | ||
DROP TABLE "_CourseToFaculty"; | ||
|
||
-- DropTable | ||
DROP TABLE "_CourseToMeetingsFaculty"; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Course" ADD CONSTRAINT "Course_facultyId_fkey" FOREIGN KEY ("facultyId") REFERENCES "Faculty"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Course" ADD CONSTRAINT "Course_facultyMeetId_fkey" FOREIGN KEY ("facultyMeetId") REFERENCES "MeetingsFaculty"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- AlterTable | ||
ALTER TABLE "Course" ALTER COLUMN "courseReferenceNumber" SET DATA TYPE TEXT, | ||
ALTER COLUMN "courseNumber" SET DATA TYPE TEXT, | ||
ALTER COLUMN "creditHours" SET DATA TYPE DOUBLE PRECISION; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Faculty" ALTER COLUMN "bannerId" SET DATA TYPE TEXT, | ||
ALTER COLUMN "courseReferenceNumber" SET DATA TYPE TEXT; | ||
|
||
-- AlterTable | ||
ALTER TABLE "MeetingTime" ALTER COLUMN "beginTime" SET DATA TYPE TEXT, | ||
ALTER COLUMN "room" SET DATA TYPE TEXT, | ||
ALTER COLUMN "category" SET DATA TYPE TEXT, | ||
ALTER COLUMN "courseReferenceNumber" SET DATA TYPE TEXT, | ||
ALTER COLUMN "endDate" SET DATA TYPE TEXT, | ||
ALTER COLUMN "endTime" SET DATA TYPE TEXT, | ||
ALTER COLUMN "hoursWeek" SET DATA TYPE DOUBLE PRECISION; | ||
|
||
-- AlterTable | ||
ALTER TABLE "MeetingsFaculty" ALTER COLUMN "category" SET DATA TYPE TEXT, | ||
ALTER COLUMN "courseReferenceNumber" SET DATA TYPE TEXT; | ||
|
||
-- AlterTable | ||
ALTER TABLE "sectionAttribute" ALTER COLUMN "courseReferenceNumber" SET DATA TYPE TEXT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters