From ab3df3a41e0555296c76bb72b3f53b42f9978d4a Mon Sep 17 00:00:00 2001 From: MartinaeyNL Date: Thu, 1 May 2025 10:57:09 +0200 Subject: [PATCH] Added note on ADD_ATTRIBUTE SQL function that overrides any existing data --- docs/developer-guide/data-migration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/developer-guide/data-migration.md b/docs/developer-guide/data-migration.md index 374cc98..fc5c5bf 100644 --- a/docs/developer-guide/data-migration.md +++ b/docs/developer-guide/data-migration.md @@ -35,6 +35,7 @@ SELECT a.id, REMOVE_ATTRIBUTES(a, 'oldAttribute1', 'oldAttribute2') FROM asset a ``` ### Add attribute to specific asset(s) (with meta items) +**Warning**: this will override any existing attribute data! ```sql SELECT a.id, ADD_ATTRIBUTE(a, 'newAttribute2', 'GEO_JSONPoint', '1'::jsonb, now(), jsonb_build_object('meta1', true, 'meta2', 123)) @@ -42,6 +43,7 @@ FROM asset a WHERE...; ``` ### Add attribute to specific asset(s) (without meta items) +**Warning**: this will override any existing attribute data! ```sql SELECT a.id, ADD_ATTRIBUTE(a, 'newAttribute1', 'GEO_JSONPoint', '1'::jsonb, now(), null) FROM asset a WHERE...;