From 10523a2285291c39de96c4408e5d8993de648de0 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 2 Jan 2023 15:59:39 -0800 Subject: [PATCH] Comment out the failure check, unsure why it doesn't work --- sql/supporters-schema.sql | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sql/supporters-schema.sql b/sql/supporters-schema.sql index d10232a..5dda458 100644 --- a/sql/supporters-schema.sql +++ b/sql/supporters-schema.sql @@ -241,15 +241,16 @@ INSERT INTO postal_address(first_name, middle_name, last_name, organization, add VALUES(NEW.donor_id, (SELECT last_insert_rowid()), 21, date("now")); -- VALUES(OLD.donor_id, (SELECT new_postal_address_id FROM wt) ); -SELECT CASE - WHEN ( (SELECT address_1 FROM donor_postal_address_mapping dp, postal_address pa - WHERE dp.donor_id = NEW.donor_id - AND pa.id = (SELECT last_insert_rowid() ) - AND dp.postal_address_id = (SELECT last_insert_rowid() ) - AND pa.address_1 = NEW.addr1 - != NEW.addr1 ) ) - THEN RAISE(FAIL, "Error encountered while adding new postal address; please verify your changes worked!") - END; +--- FIXME: Below doesn't work in sqlitebrowser, still don't know why +-- SELECT CASE +-- WHEN ( (SELECT address_1 FROM donor_postal_address_mapping dp, postal_address pa +-- WHERE dp.donor_id = NEW.donor_id +-- AND pa.id = (SELECT last_insert_rowid() ) +-- AND dp.postal_address_id = (SELECT last_insert_rowid() ) +-- AND pa.address_1 = NEW.addr1 +-- != NEW.addr1 ) ) +-- THEN RAISE(FAIL, "Error encountered while adding new postal address; please verify your changes worked!") +-- END; END;