radiostasis/db/migrations/000-initial_schema.sql

27 lines
658 B
SQL

create table series (
series_slug text primary key not null,
title text not null,
date_added date not null,
min_year smallint not null,
max_year smallint not null,
description text,
title_sort text not null
);
create table series_tags (
series_slug text not null references series (series_slug),
tag text not null,
primary key (series_slug, tag)
);
create table episodes (
series_slug text not null references series (series_slug),
episode_slug text not null,
title text not null,
file_name text not null,
file_size bigint not null,
episode_length int not null,
air_date text,
primary key (series_slug, episode_slug)
);