From 8681e3e3bc3ee51c55daeb47cb8cab457b31601a Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Thu, 13 Sep 2012 16:28:04 -0400 Subject: [PATCH] LP#1047475 Set action.hold_request.email_notify to default to false LP#1047475 points out that email notify prefs are ignored in TPAC. This defaults the column in the database to false (like most other similar columns are) and resolves the bug. Credit to Steve Callender for the idea Signed-off-by: Michael Peters --- Open-ILS/src/sql/Pg/090.schema.action.sql | 2 +- .../XXXX.action.hold_request.email_notify_default_false.sql | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.action.hold_request.email_notify_default_false.sql diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 1af6e89ead..833d7bce6a 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -393,7 +393,7 @@ CREATE TABLE action.hold_request ( hold_type TEXT NOT NULL, -- CHECK (hold_type IN ('M','T','V','C')), -- XXX constraint too constraining... holdable_formats TEXT, phone_notify TEXT, - email_notify BOOL NOT NULL DEFAULT TRUE, + email_notify BOOL NOT NULL DEFAULT FALSE, sms_notify TEXT, sms_carrier INT REFERENCES config.sms_carrier (id), frozen BOOL NOT NULL DEFAULT FALSE, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.action.hold_request.email_notify_default_false.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.action.hold_request.email_notify_default_false.sql new file mode 100644 index 0000000000..f899cec113 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.action.hold_request.email_notify_default_false.sql @@ -0,0 +1,7 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +ALTER TABLE action.hold_request ALTER COLUMN email_notify SET DEFAULT 'false'; + +COMMIT; -- 2.11.0