-- 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);