feat: UserMetadata sync (#19882)

* feat: UserMetadata sync

* refactor: sync table filters (#19887)
This commit is contained in:
Daniel Dietzler 2025-07-11 20:19:53 +02:00 committed by GitHub
parent 9e48ae3052
commit df581cc0d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 653 additions and 50 deletions

View file

@ -216,3 +216,16 @@ export const person_delete_audit = registerFunction({
RETURN NULL;
END`,
});
export const user_metadata_audit = registerFunction({
name: 'user_metadata_audit',
returnType: 'TRIGGER',
language: 'PLPGSQL',
body: `
BEGIN
INSERT INTO user_metadata_audit ("userId", "key")
SELECT "userId", "key"
FROM OLD;
RETURN NULL;
END`,
});