bazzar/db/drafts/202204300700_additional_items_and_discounts.sql
2022-04-30 07:09:40 +02:00

19 lines
557 B
SQL

CREATE TABLE coupons (
id serial not null primary key,
"name" varchar not null,
"code" varchar not null,
"value" int not null default 0
);
create table additional_products (
id serial not null primary key,
parent_product_id int references products (id) not null,
free_product_id int references products (id) not null
);
create table addtional_items (
id serial not null primary key,
parent_product_id int references products (id) not null,
"name" varchar not null
);