38929-vm/db/migrations/05_simplify_prices_index.sql
2026-03-02 11:05:01 +00:00

6 lines
196 B
SQL

-- Drop the old index with variant_id
DROP INDEX unique_price ON prices;
-- Add a new unique index without variant_id
CREATE UNIQUE INDEX unique_price ON prices (branch_id, item_id, service_id);