[open-ils-commits] [GIT] Evergreen ILS branch master updated. aabc8ae3040d1b70369c865597c6f473afd70450
Evergreen Git
git at git.evergreen-ils.org
Wed Mar 13 14:53:58 EDT 2013
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 aabc8ae3040d1b70369c865597c6f473afd70450 (commit)
via 4454d116436ae9ed9e22cd3d127684cbc4ed2272 (commit)
from b973f1bb2006c06756ff75436ac2f3ab5986caf1 (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 aabc8ae3040d1b70369c865597c6f473afd70450
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed Mar 13 14:52:16 2013 -0400
Stamping upgrade scripts for Z-source attr DELETE cascade (and repairing previous upgrade script id)
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index a7db50d..a11edd5 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0774', :eg_version); -- berick/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0775', :eg_version); -- berick/miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0774.schema.z3950_credentials.sql b/Open-ILS/src/sql/Pg/upgrade/0774.schema.z3950_credentials.sql
index 739b20f..d989230 100644
--- a/Open-ILS/src/sql/Pg/upgrade/0774.schema.z3950_credentials.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0774.schema.z3950_credentials.sql
@@ -1,7 +1,7 @@
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('0773', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0774', :eg_version);
CREATE TABLE config.z3950_source_credentials (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql b/Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql
similarity index 82%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql
rename to Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql
index 9b99364..fefe5a5 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql
@@ -1,7 +1,7 @@
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0775', :eg_version);
ALTER TABLE config.z3950_attr
DROP CONSTRAINT z3950_attr_source_fkey,
commit 4454d116436ae9ed9e22cd3d127684cbc4ed2272
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Mar 13 14:26:48 2013 -0400
LP 849008 : Cascade delete Z39.50 attributes
Force deletion of Z39.50 attributes within the database when the Z39.50
source to which the attributes refer is deleted.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index e578c0f..a7db50d 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -505,7 +505,7 @@ $$;
CREATE TABLE config.z3950_attr (
id SERIAL PRIMARY KEY,
- source TEXT NOT NULL REFERENCES config.z3950_source (name) DEFERRABLE INITIALLY DEFERRED,
+ source TEXT NOT NULL REFERENCES config.z3950_source (name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
name TEXT NOT NULL,
label TEXT NOT NULL,
code INT NOT NULL,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql
new file mode 100644
index 0000000..9b99364
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql
@@ -0,0 +1,15 @@
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE config.z3950_attr
+ DROP CONSTRAINT z3950_attr_source_fkey,
+ ADD CONSTRAINT z3950_attr_source_fkey
+ FOREIGN KEY (source)
+ REFERENCES config.z3950_source(name)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 4 ++--
.../Pg/upgrade/0774.schema.z3950_credentials.sql | 2 +-
...ema.config_z3950_source_attr_cascade_delete.sql | 15 +++++++++++++++
3 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list