From 90c507eaca26c295ff074f43f361e3af54a15bd4 Mon Sep 17 00:00:00 2001 From: Fate-JH Date: Wed, 11 Oct 2023 17:50:08 -0400 Subject: [PATCH] before this, changed table on trigger without fixing function called by trigger --- .../resources/db/migration/V010__ScoringPatch.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 server/src/main/resources/db/migration/V010__ScoringPatch.sql diff --git a/server/src/main/resources/db/migration/V010__ScoringPatch.sql b/server/src/main/resources/db/migration/V010__ScoringPatch.sql new file mode 100644 index 00000000..ad945783 --- /dev/null +++ b/server/src/main/resources/db/migration/V010__ScoringPatch.sql @@ -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;