feat: implement meal planning feature with CRUD operations and UI integration

This commit is contained in:
Nils-Johan Gynther
2026-04-16 19:37:09 +02:00
parent 8b12df4aa4
commit 1b82b02021
13 changed files with 468 additions and 1 deletions
@@ -0,0 +1,15 @@
-- CreateTable
CREATE TABLE `MealPlanEntry` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`date` DATE NOT NULL,
`recipeId` INTEGER NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) NOT NULL,
UNIQUE INDEX `MealPlanEntry_date_key`(`date`),
INDEX `MealPlanEntry_date_idx`(`date`),
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- AddForeignKey
ALTER TABLE `MealPlanEntry` ADD CONSTRAINT `MealPlanEntry_recipeId_fkey` FOREIGN KEY (`recipeId`) REFERENCES `Recipe`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;