Initial commit MKD fixes
This commit is contained in:
8
backend/migrations/add_inventory_to_districts.sql
Executable file
8
backend/migrations/add_inventory_to_districts.sql
Executable file
@@ -0,0 +1,8 @@
|
||||
-- Миграция: добавление поля inventory в таблицу districts
|
||||
-- Склад участка хранится в JSONB поле для гибкости структуры
|
||||
|
||||
ALTER TABLE districts
|
||||
ADD COLUMN IF NOT EXISTS inventory JSONB DEFAULT '[]'::jsonb;
|
||||
|
||||
-- Создаем индекс для быстрого поиска по inventory (опционально, если нужно)
|
||||
-- CREATE INDEX IF NOT EXISTS idx_districts_inventory ON districts USING GIN (inventory);
|
||||
Reference in New Issue
Block a user