[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 3d4fefcba3aa568ddecceb2a70402cf367a20854
Evergreen Git
git at git.evergreen-ils.org
Mon Jun 11 12:02:40 EDT 2012
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, rel_2_2 has been updated
via 3d4fefcba3aa568ddecceb2a70402cf367a20854 (commit)
from 27959a57b75dca8f41aeaee3d1d066ba672b7bd6 (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 3d4fefcba3aa568ddecceb2a70402cf367a20854
Author: Michael Peters <mrpeters at library.in.gov>
Date: Tue Apr 10 16:12:13 2012 -0400
LP#845096 - coded_value_map_id_seq doesn't have a proper last_value
Thanks to Kathy Lussier for the original report. Kathy discovered
that users were unable to add new Coded Value Maps via the staff client.
With some log digging, I discovered the culprit was a rash of
primary key errors.
With help from Dan Scott, I was able to rectify this via a quick bit
of SQL which properly sets the last_value in the sequence.
Thanks, Kathy and Dan!
Signed-off-by: Michael Peters <mrpeters at library.in.gov>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index cb05532..af78f9e 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -87,7 +87,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 ('0715', :eg_version); -- dbs/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0716', :eg_version); -- mrpeters/dyrcona
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index e828667..b3ec916 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -6349,6 +6349,7 @@ INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
(535, 'bib_level', 'm', oils_i18n_gettext('535', 'Monograph/Item', 'ccvm', 'value')),
(536, 'bib_level', 's', oils_i18n_gettext('536', 'Serial', 'ccvm', 'value'));
+SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, (SELECT max(id) FROM config.coded_value_map));
-- Trigger Event Definitions -------------------------------------------------
diff --git a/Open-ILS/src/sql/Pg/upgrade/0716.coded_value_map_id_seq_fix.sql b/Open-ILS/src/sql/Pg/upgrade/0716.coded_value_map_id_seq_fix.sql
new file mode 100644
index 0000000..f1d7b57
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0716.coded_value_map_id_seq_fix.sql
@@ -0,0 +1,9 @@
+-- Evergreen DB patch 0716.coded_value_map_id_seq_fix.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0716', :eg_version);
+
+SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, (SELECT max(id) FROM config.coded_value_map));
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql
index 8329a41..27f0fe1 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql
@@ -12417,6 +12417,13 @@ INSERT INTO permission.perm_list ( id, code, description )
)
);
+
+-- Evergreen DB patch 0716.coded_value_map_id_seq_fix.sql
+
+SELECT evergreen.upgrade_deps_block_check('0716', :eg_version);
+
+SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, (SELECT max(id) FROM config.coded_value_map));
+
COMMIT;
\qecho ************************************************************************
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 1 +
.../Pg/upgrade/0716.coded_value_map_id_seq_fix.sql | 9 +++++++++
.../sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql | 7 +++++++
4 files changed, 18 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0716.coded_value_map_id_seq_fix.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list