chore(*.psql/*.sql): update all *.psql to *.sql files

This commit is contained in:
Cory Dransfeldt 2025-04-30 12:21:33 -07:00
parent c9015a7f2b
commit fc37600b8b
No known key found for this signature in database
63 changed files with 21 additions and 41 deletions

View file

@ -2,12 +2,10 @@ BEGIN
UPDATE artists
SET total_plays = total_plays - 1
WHERE name_string = OLD.artist_name;
UPDATE albums
SET total_plays = total_plays - 1
WHERE name = OLD.album_name
AND artist_name = OLD.artist_name;
UPDATE genres
SET total_plays = total_plays - 1
WHERE id = (
@ -15,6 +13,5 @@ BEGIN
FROM artists
WHERE name_string = OLD.artist_name
);
RETURN OLD;
END;

View file

@ -4,7 +4,6 @@ BEGIN
IF NEW.air_date < CURRENT_DATE AND NEW.status = 'upcoming' THEN
NEW.status := 'aired';
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;

View file

@ -2,12 +2,10 @@ BEGIN
UPDATE artists
SET total_plays = total_plays + 1
WHERE name_string = NEW.artist_name;
UPDATE albums
SET total_plays = total_plays + 1
WHERE key = NEW.album_key
AND artist_name = NEW.artist_name;
UPDATE genres
SET total_plays = total_plays + 1
WHERE id = (
@ -15,6 +13,5 @@ BEGIN
FROM artists
WHERE name_string = NEW.artist_name
);
RETURN NEW;
END;