Added UserID on Tag

This commit is contained in:
Florian Sylvain
2023-01-30 10:47:01 +01:00
parent 34c5aa0e37
commit 44b842d66c
4 changed files with 33 additions and 18 deletions
@@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `user_id` to the `Tag` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE `Tag` ADD COLUMN `user_id` INTEGER NOT NULL;
-- AddForeignKey
ALTER TABLE `Tag` ADD CONSTRAINT `Tag_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;