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@library.in.gov>
(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 -------------------------------------------------
--- /dev/null
+-- Evergreen DB patch XXXX.coded_value_map_id_seq_fix.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, (SELECT max(id) FROM config.coded_value_map));
+
+COMMIT;