bazzar/migrations/202204300704_photos.sql
2022-05-04 21:34:26 +02:00

12 lines
350 B
SQL

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
);