From 2bd7b2e952ef9c493f543643e0d49292998080c2 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Sat, 20 Jan 2024 19:47:26 +0100 Subject: [PATCH] Fix revert for contact_web If there were contacts added with add_contact passing an empty string to `web` parameter, contact_web would not have such row, and during the revert the `web` parameter of contact would end up being NULL. --- revert/contact_web.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/revert/contact_web.sql b/revert/contact_web.sql index 3a63784..3e32510 100644 --- a/revert/contact_web.sql +++ b/revert/contact_web.sql @@ -14,6 +14,11 @@ from contact_web as web where web.contact_id = contact.contact_id ; +update contact +set web = '' +where web is null +; + alter table contact alter column web set not null ;