feat: initial commit
This commit is contained in:
commit
e214116e40
253 changed files with 17406 additions and 0 deletions
12
queries/functions/update_scheduled_on_watch.psql
Normal file
12
queries/functions/update_scheduled_on_watch.psql
Normal file
|
@ -0,0 +1,12 @@
|
|||
CREATE OR REPLACE FUNCTION update_scheduled_on_watch()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
UPDATE scheduled_episodes
|
||||
SET status = 'watched'
|
||||
WHERE show_id = NEW.show
|
||||
AND season_number = NEW.season_number
|
||||
AND episode_number = NEW.episode_number;
|
||||
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
Loading…
Add table
Add a link
Reference in a new issue