added new and old to changes and pg notify

This commit is contained in:
2026-03-20 01:59:48 -04:00
parent 31519e8447
commit fcd8310ed8
2 changed files with 355 additions and 218 deletions

View File

@ -785,7 +785,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -793,6 +794,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"first_name\":\"IncompleteFirst\",",
" \"last_name\":\"IncompleteLast\",",
@ -807,17 +809,22 @@
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"first_name\":\"IncompleteFirst\",",
" \"id\":\"{{uuid:person_id}}\",",
" \"last_name\":\"IncompleteLast\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"first_name\":\"IncompleteFirst\",",
" \"id\":\"{{uuid:person_id}}\",",
" \"last_name\":\"IncompleteLast\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"first_name\":\"IncompleteFirst\",",
" \"last_name\":\"IncompleteLast\",",
" \"type\":\"person\"",
" }",
" }')"
]
]
}
@ -872,7 +879,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -881,6 +889,9 @@
")",
"VALUES (",
" '{",
" \"contact_id\":\"old-contact\"",
" }',",
" '{",
" \"contact_id\":\"abc-contact\",",
" \"type\":\"person\"",
" }',",
@ -893,22 +904,25 @@
],
[
"SELECT pg_notify('entity', '{",
" \"changes\":{",
" \"contact_id\":\"abc-contact\",",
" \"type\":\"person\"",
" },",
" \"complete\":{",
" \"contact_id\":\"abc-contact\",",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"LookupFirst\",",
" \"id\":\"22222222-2222-2222-2222-222222222222\",",
" \"last_name\":\"LookupLast\",",
" \"modified_at\":\"2026-03-10T00:00:00Z\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"pronouns\":\"they/them\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"contact_id\":\"abc-contact\",",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"LookupFirst\",",
" \"id\":\"22222222-2222-2222-2222-222222222222\",",
" \"last_name\":\"LookupLast\",",
" \"modified_at\":\"2026-03-10T00:00:00Z\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"pronouns\":\"they/them\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"contact_id\":\"abc-contact\",",
" \"type\":\"person\"",
" },",
" \"old\":{",
" \"contact_id\":\"old-contact\"",
" }",
" }')"
]
]
}
@ -959,7 +973,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -968,6 +983,10 @@
")",
"VALUES (",
" '{",
" \"first_name\":\"OldFirst\",",
" \"last_name\":\"OldLast\"",
" }',",
" '{",
" \"first_name\":\"NewFirst\",",
" \"last_name\":\"NewLast\",",
" \"type\":\"person\"",
@ -981,20 +1000,24 @@
],
[
"SELECT pg_notify('entity', '{",
" \"changes\":{",
" \"first_name\":\"NewFirst\",",
" \"last_name\":\"NewLast\",",
" \"type\":\"person\"",
" },",
" \"complete\":{",
" \"first_name\":\"NewFirst\",",
" \"id\":\"11111111-1111-1111-1111-111111111111\",",
" \"last_name\":\"NewLast\",",
" \"modified_at\":\"2026-03-10T00:00:00Z\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"first_name\":\"NewFirst\",",
" \"id\":\"11111111-1111-1111-1111-111111111111\",",
" \"last_name\":\"NewLast\",",
" \"modified_at\":\"2026-03-10T00:00:00Z\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"first_name\":\"NewFirst\",",
" \"last_name\":\"NewLast\",",
" \"type\":\"person\"",
" },",
" \"old\":{",
" \"first_name\":\"OldFirst\",",
" \"last_name\":\"OldLast\"",
" }",
" }')"
]
]
}
@ -1079,7 +1102,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -1087,6 +1111,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"John\",",
@ -1103,19 +1128,26 @@
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"John\",",
" \"id\":\"123\",",
" \"last_name\":\"Doe\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"pronouns\":\"\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"John\",",
" \"id\":\"123\",",
" \"last_name\":\"Doe\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"pronouns\":\"\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"date_of_birth\":\"1990-01-01T00:00:00Z\",",
" \"first_name\":\"John\",",
" \"last_name\":\"Doe\",",
" \"pronouns\":\"\",",
" \"type\":\"person\"",
" }",
" }')"
]
]
}
@ -1192,7 +1224,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -1200,6 +1233,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"date_of_birth\":\"2000-01-01\",",
" \"first_name\":\"Bob\",",
@ -1247,7 +1281,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -1255,6 +1290,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"customer_id\":\"{{uuid:customer_id}}\",",
" \"total\":100.0,",
@ -1269,32 +1305,43 @@
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"customer_id\":\"{{uuid:customer_id}}\",",
" \"id\":\"{{uuid:order_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"total\":100.0,",
" \"type\":\"order\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"customer_id\":\"{{uuid:customer_id}}\",",
" \"id\":\"{{uuid:order_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"total\":100.0,",
" \"type\":\"order\"",
" },",
" \"new\":{",
" \"customer_id\":\"{{uuid:customer_id}}\",",
" \"total\":100.0,",
" \"type\":\"order\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"date_of_birth\":\"2000-01-01\",",
" \"first_name\":\"Bob\",",
" \"id\":\"{{uuid:customer_id}}\",",
" \"last_name\":\"Smith\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"date_of_birth\":\"2000-01-01\",",
" \"first_name\":\"Bob\",",
" \"id\":\"{{uuid:customer_id}}\",",
" \"last_name\":\"Smith\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"date_of_birth\":\"2000-01-01\",",
" \"first_name\":\"Bob\",",
" \"last_name\":\"Smith\",",
" \"type\":\"person\"",
" }",
" }')"
]
]
}
@ -1388,7 +1435,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -1396,6 +1444,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"order_id\":\"abc\",",
" \"price\":99.0,",
@ -1411,7 +1460,8 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
@ -1419,6 +1469,7 @@
" modified_by",
")",
"VALUES (",
" NULL,",
" '{",
" \"total\":99.0,",
" \"type\":\"order\"",
@ -1432,31 +1483,41 @@
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"abc\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"total\":99.0,",
" \"type\":\"order\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"abc\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"total\":99.0,",
" \"type\":\"order\"",
" },",
" \"new\":{",
" \"total\":99.0,",
" \"type\":\"order\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:line_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"order_id\":\"abc\",",
" \"price\":99.0,",
" \"product\":\"Widget\",",
" \"type\":\"order_line\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:line_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"order_id\":\"abc\",",
" \"price\":99.0,",
" \"product\":\"Widget\",",
" \"type\":\"order_line\"",
" },",
" \"new\":{",
" \"order_id\":\"abc\",",
" \"price\":99.0,",
" \"product\":\"Widget\",",
" \"type\":\"order_line\"",
" }",
" }')"
]
]
}
@ -1572,13 +1633,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{\"number\":\"555-0001\",\"type\":\"phone_number\"}',",
" '{{uuid:phone1_id}}',",
" '{{uuid}}',",
@ -1626,13 +1689,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"is_primary\":true,",
" \"source_id\":\"{{uuid:person_id}}\",",
@ -1674,13 +1739,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"number\":\"555-0002\",",
" \"type\":\"phone_number\"",
@ -1731,13 +1798,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"is_primary\":false,",
" \"source_id\":\"{{uuid:person_id}}\",",
@ -1779,13 +1848,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"address\":\"test@example.com\",",
" \"type\":\"email_address\"",
@ -1836,13 +1907,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"is_primary\":false,",
" \"source_id\":\"{{uuid:person_id}}\",",
@ -1860,13 +1933,15 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" NULL,",
" '{",
" \"first_name\":\"Relation\",",
" \"last_name\":\"Test\",",
@ -1881,107 +1956,148 @@
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"first_name\":\"Relation\",",
" \"id\":\"{{uuid:person_id}}\",",
" \"last_name\":\"Test\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"first_name\":\"Relation\",",
" \"id\":\"{{uuid:person_id}}\",",
" \"last_name\":\"Test\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"first_name\":\"Relation\",",
" \"last_name\":\"Test\",",
" \"type\":\"person\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact1_id}}\",",
" \"is_primary\":true,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone1_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact1_id}}\",",
" \"is_primary\":true,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone1_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" },",
" \"new\":{",
" \"is_primary\":true,",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone1_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:phone1_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"number\":\"555-0001\",",
" \"type\":\"phone_number\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:phone1_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"number\":\"555-0001\",",
" \"type\":\"phone_number\"",
" },",
" \"new\":{",
" \"number\":\"555-0001\",",
" \"type\":\"phone_number\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact2_id}}\",",
" \"is_primary\":false,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone2_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact2_id}}\",",
" \"is_primary\":false,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone2_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" },",
" \"new\":{",
" \"is_primary\":false,",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:phone2_id}}\",",
" \"target_type\":\"phone_number\",",
" \"type\":\"contact\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:phone2_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"number\":\"555-0002\",",
" \"type\":\"phone_number\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:phone2_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"number\":\"555-0002\",",
" \"type\":\"phone_number\"",
" },",
" \"new\":{",
" \"number\":\"555-0002\",",
" \"type\":\"phone_number\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact3_id}}\",",
" \"is_primary\":false,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:email1_id}}\",",
" \"target_type\":\"email_address\",",
" \"type\":\"contact\"",
" }",
"}')"
" \"complete\":{",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:contact3_id}}\",",
" \"is_primary\":false,",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:email1_id}}\",",
" \"target_type\":\"email_address\",",
" \"type\":\"contact\"",
" },",
" \"new\":{",
" \"is_primary\":false,",
" \"source_id\":\"{{uuid:person_id}}\",",
" \"source_type\":\"person\",",
" \"target_id\":\"{{uuid:email1_id}}\",",
" \"target_type\":\"email_address\",",
" \"type\":\"contact\"",
" }",
" }')"
],
[
"SELECT pg_notify('entity', '{",
" \"complete\":{",
" \"address\":\"test@example.com\",",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:email1_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"email_address\"",
" }",
"}')"
" \"complete\":{",
" \"address\":\"test@example.com\",",
" \"created_at\":\"{{timestamp}}\",",
" \"created_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"id\":\"{{uuid:email1_id}}\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"email_address\"",
" },",
" \"new\":{",
" \"address\":\"test@example.com\",",
" \"type\":\"email_address\"",
" }",
" }')"
]
]
}
@ -2023,13 +2139,17 @@
],
[
"INSERT INTO agreego.change (",
" changes,",
" \"old\",",
" \"new\",",
" entity_id,",
" id,",
" kind,",
" modified_at,",
" modified_by",
") VALUES (",
" '{",
" \"archived\":false",
" }',",
" '{\"archived\":true,\"type\":\"person\"}',",
" 'abc-archived',",
" '{{uuid}}',",
@ -2040,18 +2160,23 @@
],
[
"SELECT pg_notify('entity', '{",
" \"changes\":{",
" \"archived\":true,\"type\":\"person\"},",
" \"complete\":{",
" \"archived\":true,",
" \"first_name\":\"ArchivedFirst\",",
" \"id\":\"abc-archived\",",
" \"last_name\":\"ArchivedLast\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" }",
"}')"
" \"complete\":{",
" \"archived\":true,",
" \"first_name\":\"ArchivedFirst\",",
" \"id\":\"abc-archived\",",
" \"last_name\":\"ArchivedLast\",",
" \"modified_at\":\"{{timestamp}}\",",
" \"modified_by\":\"00000000-0000-0000-0000-000000000000\",",
" \"type\":\"person\"",
" },",
" \"new\":{",
" \"archived\":true,",
" \"type\":\"person\"",
" },",
" \"old\":{",
" \"archived\":false",
" }",
" }')"
]
]
}