chore(*.psql/*.sql): update all *.psql to *.sql files
This commit is contained in:
parent
c9015a7f2b
commit
fc37600b8b
63 changed files with 21 additions and 41 deletions
11
queries/functions/update_scheduled_on_watch.sql
Normal file
11
queries/functions/update_scheduled_on_watch.sql
Normal file
|
@ -0,0 +1,11 @@
|
|||
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