bazzar/migrations/202204300704_photos.sql

12 lines
350 B
MySQL
Raw Normal View History

2022-04-30 07:09:40 +02:00
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
);