12 lines
350 B
MySQL
12 lines
350 B
MySQL
|
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
|
||
|
);
|