Add photos

This commit is contained in:
eraden 2022-04-30 07:09:40 +02:00
parent 1e1cd9906d
commit 81e75a4888
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,18 @@
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
);

View File

@ -0,0 +1,11 @@
CREATE TABLE photos (
id serial not null primary key,
"local_path" varchar not null unique,
"hashed_path" varchar not null unique
);
create table product_photos (
id serial not null primary key,
product_id int references products (id) not null,
photo_id int references photos (id) not null
);