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KQBDWKYAC SE6MCCXTIXSGMAH5EL7EPDXIQKV6THCCY2H4OQJJQOHCUQAWE5VQC Y2ZGX4FCDVEXTYPOQNAZ5GKM2GBSF6B6EFN4EAP2V5XGHKFNCMSQC (URL is not null and address is null and address2 is null and city is null and postal_code is null and coordinate is null and timezone is null) or(address is not null and city is not null and postal_code is not null and coordinate is not null and timezone is not null)
(type = 'online' and url is not null and address is null and address2 is null and city is null and postal_code is null and coordinate is null and timezone is null) or(type = 'physical' and address is not null and city is not null and postal_code is not null and coordinate is not null and timezone is not null)
ID serial primary key,product integer not null references product on delete cascade,portions smallint check (portions > 1),
variant_id serial primary key,product_id integer not null references product on delete cascade,portions smallint not null default 1 check (portions > 0),
create unique index unique_variant_2 on variant (product, quantity) where portions is null and flavor is null;create unique index unique_variant_3_portions on variant (product, portions, quantity) where portions is not null and flavor is null;create unique index unique_variant_3_flavor on variant (product, quantity, flavor) where portions is null and flavor is not null;create unique index unique_variant_4 on variant (product, portions, quantity, flavor) where portions is not null and flavor is not null;
create unique index unique_variant_2 on variant (product_id, quantity) where portions is null and flavor is null;create unique index unique_variant_3_portions on variant (product_id, portions, quantity) where portions is not null and flavor is null;create unique index unique_variant_3_flavor on variant (product_id, quantity, flavor) where portions is null and flavor is not null;create unique index unique_variant_4 on variant (product_id, portions, quantity, flavor) where portions is not null and flavor is not null;
ID serial primary key,variant integer not null references variant on delete cascade,store integer not null references store on delete cascade,
menu_item_id serial primary key,variant_id integer not null references variant on delete cascade,store_id integer not null references store on delete cascade,
create type COMT as enum ('inconclusive', 'Val/Val', 'Val/Met', 'Met/Met');create type AKT1 as enum ('inconclusive', 'T/T', 'C/T', 'C/C');create type CYP2C9 as enum ('inconclusive', '*1/*1', '*1/*3', '*3/*3');
create type comt as enum ('inconclusive', 'Val/Val', 'Val/Met', 'Met/Met');create type akt1 as enum ('inconclusive', 'T/T', 'C/T', 'C/C');create type cyp2c9 as enum ('inconclusive', '*1/*1', '*1/*3', '*3/*3');
create type CYP2C19_2 as enum ('inconclusive', '*1/*1', '*1/*2', '*2/*2');create type CYP2C19_3 as enum ('inconclusive', '*1/*1', '*1/*3', '*3/*3');create type CYP2C19_17 as enum ('inconclusive', '*1/*1', '*1/*17', '*17/*17');
create type cyp2c19_2 as enum ('inconclusive', '*1/*1', '*1/*2', '*2/*2');create type cyp2c19_3 as enum ('inconclusive', '*1/*1', '*1/*3', '*3/*3');create type cyp2c19_17 as enum ('inconclusive', '*1/*1', '*1/*17', '*17/*17');
COMT COMT,AKT1 AKT1,CYP2C9 CYP2C9,CYP2C19_2 CYP2C19_2,CYP2C19_3 CYP2C19_3,CYP2C19_17 CYP2C19_17
comt comt,akt1 akt1,cyp2c9 cyp2c9,cyp2c19_2 cyp2c19_2,cyp2c19_3 cyp2c19_3,cyp2c19_17 cyp2c19_17
ID serial primary key,user_account integer references user_account on delete cascade,store integer not null references store on delete cascade,status status,
cart_id serial primary key,user_id integer references usr on delete cascade,store_id integer not null references store on delete cascade,status status not null default 'active',
ID serial primary key,cart integer not null references cart on delete cascade,menu_item integer not null references menu_item on delete cascade,
line_item_id serial primary key,cart_id integer not null references cart on delete cascade,menu_item_id integer not null references menu_item on delete cascade,
periods.add_system_time_period('user_account', excluded_column_names => ARRAY['token_hash', 'token_expiry']),periods.add_system_versioning('user_account'),
periods.add_system_time_period('usr', excluded_column_names => ARRAY['token_hash', 'token_expiry']),periods.add_system_versioning('usr'),
if(e[i][0].handle === 'thc-dark-chocolate-bar-bhang' || e[i][0].handle === 'thc-milk-chocolate-bar-bhang' && quantity === '10' && portions === null) {
if(e[i][0].handle === 'thc-dark-chocolate-bar-bhang' || e[i][0].handle === 'thc-milk-chocolate-bar-bhang' && quantity === '10' && portions === 1) {
} else if(e[i][0].handle === 'balance-solid-milk-chocolate-chowie-wowie' || e[i][0].handle === 'thc-solid-milk-chocolate-chowie-wowie' && quantity === '16' && portions === null) {
} else if(e[i][0].handle === 'balance-solid-milk-chocolate-chowie-wowie' || e[i][0].handle === 'thc-solid-milk-chocolate-chowie-wowie' && quantity === '16' && portions === 1) {
} else if(e[i][0].handle === 'pause-dark-milk-chocolate-bar-tokyo-smoke' || e[i][0].handle === 'go-dark-milk-chocolate-bar-tokyo-smoke' && quantity === '32' && portions === null) {
} else if(e[i][0].handle === 'pause-dark-milk-chocolate-bar-tokyo-smoke' || e[i][0].handle === 'go-dark-milk-chocolate-bar-tokyo-smoke' && quantity === '32' && portions === 1) {