mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Exclude last modified columns from changelog triggering
This commit is contained in:
@@ -19,6 +19,9 @@ DECLARE
|
|||||||
_website_id UUID;
|
_website_id UUID;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_TABLE_NAME = 'website' THEN
|
IF TG_TABLE_NAME = 'website' THEN
|
||||||
|
IF (to_jsonb (OLD.*) - 'last_modified_at') = (to_jsonb (NEW.*) - 'last_modified_at') OR (to_jsonb (OLD.*) - 'last_modified_by') = (to_jsonb (NEW.*) - 'last_modified_by') THEN
|
||||||
|
RETURN NEW;
|
||||||
|
END IF;
|
||||||
_website_id := NEW.id;
|
_website_id := NEW.id;
|
||||||
ELSE
|
ELSE
|
||||||
_website_id := COALESCE(NEW.website_id, OLD.website_id);
|
_website_id := COALESCE(NEW.website_id, OLD.website_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user