before this, changed table on trigger without fixing function called by trigger

This commit is contained in:
Fate-JH 2023-10-11 17:50:08 -04:00
parent 2edb50eb03
commit 90c507eaca

View file

@ -0,0 +1,15 @@
/* Original: V008__Scoring.sql */
CREATE OR REPLACE FUNCTION fn_avatar_addDebtEntry()
RETURNS TRIGGER
AS
$$
DECLARE newAvatarId Int;
BEGIN
newAvatarId := NEW.id;
BEGIN
INSERT INTO progressiondebt (avatar_id)
VALUES (newAvatarId);
END;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;