Comment out the failure check, unsure why it doesn't work

This commit is contained in:
Bradley M. Kuhn 2023-01-02 15:59:39 -08:00
parent d80c93f16a
commit 10523a2285

View file

@ -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;