24 lines
930 B
SQL
24 lines
930 B
SQL
/*
|
|
Warnings:
|
|
|
|
- Added the required column `locationId` to the `Report` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- DropForeignKey
|
|
ALTER TABLE `Report` DROP FOREIGN KEY `Report_assignmentId_fkey`;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE `Report` ADD COLUMN `locationId` INTEGER NOT NULL,
|
|
MODIFY `assignmentId` INTEGER NULL,
|
|
MODIFY `placementCount` INTEGER NULL,
|
|
MODIFY `videoCount` INTEGER NULL,
|
|
MODIFY `returnVisitInfoCount` INTEGER NULL,
|
|
MODIFY `conversationCount` INTEGER NULL,
|
|
MODIFY `experienceInfo` VARCHAR(191) NULL;
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE `Report` ADD CONSTRAINT `Report_locationId_fkey` FOREIGN KEY (`locationId`) REFERENCES `Location`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE `Report` ADD CONSTRAINT `Report_assignmentId_fkey` FOREIGN KEY (`assignmentId`) REFERENCES `Assignment`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|