19 lines
557 B
MySQL
19 lines
557 B
MySQL
|
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
|
||
|
);
|