album/db/00001_init.sql
Rasmus Kaj b1d53c0762 Photos can have tags.
Read old data from kphotoalbum.
2015-11-23 06:48:09 +01:00

16 lines
375 B
SQL

create table public.photo (
id serial primary key,
path varchar(100) unique not null
);
create table public.tag (
id serial primary key,
tag varchar(100) unique not null,
slug varchar(100) unique not null
);
create table public.photo_tag (
photo integer not null references public.photo (id),
tag integer not null references public.tag (id)
);