B:BD[
5.2925] → [
2.1333:1849]
create unique index upi_variant_2 on variant (product_id, quantity) where portions is null and flavor is null;
create unique index upi_variant_3_portions on variant (product_id, portions, quantity) where portions is not null and flavor is null;
create unique index upi_variant_3_flavor on variant (product_id, quantity, flavor) where portions is null and flavor is not null;
create unique index upi_variant_4 on variant (product_id, portions, quantity, flavor) where portions is not null and flavor is not null;
create unique index upi_variant_2 on variant (product_id, portions) where quantity is null and flavor is null;
create unique index upi_variant_3_portions on variant (product_id, portions, quantity) where quantity is not null and flavor is null;
create unique index upi_variant_3_flavor on variant (product_id, portions, flavor) where quantity is null and flavor is not null;
create unique index upi_variant_4 on variant (product_id, portions, quantity, flavor) where quantity is not null and flavor is not null;