chore(*.psql): update functions; add update_artist_key.psql for merging artists flow

This commit is contained in:
Cory Dransfeldt 2025-04-18 19:51:33 -07:00
parent 15982f220a
commit 678384d8d9
No known key found for this signature in database
8 changed files with 48 additions and 19 deletions

View file

@ -1,5 +1,8 @@
CREATE OR REPLACE FUNCTION update_album_key(old_album_key TEXT, new_album_key TEXT)
RETURNS void AS $$
BEGIN
UPDATE listens
SET album_key = new_album_key
WHERE album_key = old_album_key;
END;
$$ LANGUAGE plpgsql;