-
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.
Add modifications for delete on cascade from clients to cases.
- Loading branch information
Showing
4 changed files
with
27 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- DropForeignKey | ||
ALTER TABLE `case` DROP FOREIGN KEY `Case_cid_fkey`; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE `Case` ADD CONSTRAINT `Case_cid_fkey` FOREIGN KEY (`cid`) REFERENCES `Client`(`cid`) 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,14 @@ | ||
/* | ||
Warnings: | ||
- Made the column `cid` on table `case` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE `case` DROP FOREIGN KEY `Case_cid_fkey`; | ||
|
||
-- AlterTable | ||
ALTER TABLE `case` MODIFY `cid` INTEGER NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE `Case` ADD CONSTRAINT `Case_cid_fkey` FOREIGN KEY (`cid`) REFERENCES `Client`(`cid`) 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