Files
recipe-app/backend/prisma/migrations/20260524_add_origin_countries/migration.sql
T
Nils-Johan Gynther 27d622bfe6
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 3m32s
Test Suite / flutter-quality (push) Failing after 1m0s
feat(inventory): add multi-country origin tracking
- Added `originCountries` field to `InventoryItem` model for multi-country origin support
- Updated `CreateInventoryDto` and `UpdateInventoryDto` with `originCountries` array field
- Modified `InventoryService` to handle `originCountries` in create and update operations
- Added `origin` field to `FlyerImportItem` response type for consistency
- Added `categoryId` field to `ParsedReceiptItem` DTO for improved receipt parsing
- Created database migration `20260524_add_origin_countries` for schema changes
2026-05-24 21:31:53 +02:00

9 lines
403 B
SQL

-- Add originCountries field to InventoryItem table
-- This migration adds support for multiple origin countries as a JSON array
ALTER TABLE `InventoryItem`
ADD COLUMN `originCountries` JSON NULL
AFTER `origin`;
-- Create an index for the originCountries field for better query performance
CREATE INDEX `IDX_InventoryItem_originCountries` ON `InventoryItem` ((CAST(`originCountries` AS CHAR(255))));