Add ability to watch an episode
- Migration for new backing table. - CRUD server functions, new components to display and interact.
This commit is contained in:
parent
75e388555b
commit
b2e55008dd
11 changed files with 317 additions and 43 deletions
|
@ -1,6 +1,12 @@
|
|||
create table if not exists "public"."series" (
|
||||
"id" uuid default gen_random_uuid() not null primary key,
|
||||
"name" text not null,
|
||||
"created" timestamptz default now() not null,
|
||||
"updated" timestamptz default now() not null
|
||||
create table if not exists series (
|
||||
id uuid default gen_random_uuid() not null primary key,
|
||||
created timestamptz default now() not null,
|
||||
updated timestamptz default now() not null,
|
||||
name text not null,
|
||||
source text not null check (source in (
|
||||
'Disney', 'Hulu', 'Paramount', 'Prime', 'Max', 'Netflix', 'Shudder'
|
||||
)),
|
||||
source_url text not null,
|
||||
imdb text null,
|
||||
wikipedia text null
|
||||
);
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
alter table "public"."series" add column source text not null;
|
||||
alter table "public"."series" add column source_url text not null;
|
||||
alter table "public"."series" add column imdb text null;
|
||||
alter table "public"."series" add column wikipedia text null
|
9
migrations/20240914205329_add-viewing.sql
Normal file
9
migrations/20240914205329_add-viewing.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
create table if not exists viewing (
|
||||
id uuid default gen_random_uuid() not null primary key,
|
||||
series_id uuid not null references series(id),
|
||||
created timestamptz default now() not null,
|
||||
updated timestamptz default now() not null,
|
||||
season smallint not null check (season > 0),
|
||||
episode smallint not null check (episode > 0),
|
||||
"comment" text null
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue