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;