2024-01-17 04:21:38 +00:00
|
|
|
create table if not exists stars (
|
|
|
|
id blob not null primary key default (julid_new()),
|
|
|
|
name text not null,
|
|
|
|
metadata_url text,
|
2024-04-10 00:44:37 +00:00
|
|
|
born text,
|
|
|
|
died text
|
2024-01-17 04:21:38 +00:00
|
|
|
);
|
|
|
|
create index if not exists stars_name_dex on stars (lower(name));
|
|
|
|
|
|
|
|
-- as in screen credits for a movie
|
|
|
|
create table if not exists credits (
|
|
|
|
star blob not null,
|
|
|
|
watch blob not null,
|
|
|
|
credit text, -- "actor", "director", whatevs
|
|
|
|
unique (star, watch, credit),
|
|
|
|
foreign key (star) references stars (id),
|
|
|
|
foreign key (watch) references watches (id)
|
|
|
|
);
|
|
|
|
create index if not exists credits_star_dex on credits (star);
|
|
|
|
create index if not exists credits_watch_dex on credits (watch);
|