Added user_id on Category

This commit is contained in:
Florian Sylvain committed 2023-01-27 13:09:17 +01:00
1 parent 766b9ee9fb
commit 7bd6edfd70
2 files changed
+15 -1

No files matched your search

@@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `user_id` to the `Category` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE `Category` ADD COLUMN `user_id` INTEGER NOT NULL;
-- AddForeignKey
ALTER TABLE `Category` ADD CONSTRAINT `Category_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;