[open-ils-commits] [GIT] Evergreen ILS branch master updated. ab23f660bdd18d52e31367b66744410cdf321744

Evergreen Git git at git.evergreen-ils.org
Fri May 1 16:06:53 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  ab23f660bdd18d52e31367b66744410cdf321744 (commit)
      from  01f89cf09239696b8f4ac29563440a70a51c03d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ab23f660bdd18d52e31367b66744410cdf321744
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri May 1 16:06:14 2015 -0400

    Forward-port 2.8.0 to 2.8.1 SQL upgrade
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.8.0-2.8.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.8.0-2.8.1-upgrade-db.sql
new file mode 100644
index 0000000..4cdda12
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.8.0-2.8.1-upgrade-db.sql
@@ -0,0 +1,35 @@
+--Upgrade Script for 2.8.0 to 2.8.1
+\set eg_version '''2.8.1'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.8.1', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('0916', :eg_version);
+
+CREATE OR REPLACE FUNCTION actor.convert_usr_note_to_message () RETURNS TRIGGER AS $$
+DECLARE
+	sending_ou INTEGER;
+BEGIN
+	IF NEW.pub THEN
+		IF TG_OP = 'UPDATE' THEN
+			IF OLD.pub = TRUE THEN
+				RETURN NEW;
+			END IF;
+		END IF;
+
+		SELECT INTO sending_ou aw.owning_lib
+		FROM auditor.get_audit_info() agai
+		JOIN actor.workstation aw ON (aw.id = agai.eg_ws);
+		IF sending_ou IS NULL THEN
+			SELECT INTO sending_ou home_ou
+			FROM actor.usr
+			WHERE id = NEW.creator;
+		END IF;
+		INSERT INTO actor.usr_message (usr, title, message, sending_lib)
+			VALUES (NEW.usr, NEW.title, NEW.value, sending_ou);
+	END IF;
+
+	RETURN NEW;
+END;
+$$ LANGUAGE PLPGSQL;
+
+COMMIT;

-----------------------------------------------------------------------

Summary of changes:
 .../2.8.0-2.8.1-upgrade-db.sql}                    |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
 copy Open-ILS/src/sql/Pg/{upgrade/0916.schema.use-ws-lib-for-messages.sql => version-upgrade/2.8.0-2.8.1-upgrade-db.sql} (83%)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list