27d622bfe6
- 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
9 lines
403 B
SQL
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)))); |