2.0-2.1-upgrade-db.sql choke points during upgrade from 2.0.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen version: Upgrading process from 2.0.6 - 2.1RC2
OpenSRF version: 2.0
PostgreSQL version: 9.0
Linux distribution: Ubuntu 10.04
Description: When running the upgrade 2.0-2.1-
Here are the sql statements causing the errors and how I had to work around them:
DROP TABLE config.
– Error because tables linked to this table; used CASCADE to drop linked tables.
INSERT INTO metabib.record_attr (id,attrs)
SELECT mrd.record, hstore(mrd) - '{id,record}
--Duplicate record error. I had to fix by deleting rows with duplicate (record) fileds in metabib.
INSERT INTO config.
( name, label, description, datatype ) VALUES
( 'circ.user_
'Circ: Patron Merge Address Delete',
'Delete address(es) of subordinate user(s) in a patron merge',
'bool'
);
INSERT INTO config.
( name, label, description, datatype ) VALUES
( 'circ.user_
'Circ: Patron Merge Barcode Delete',
'Delete barcode(s) of subordinate user(s) in a patron merge',
'bool'
);
INSERT INTO config.
( name, label, description, datatype ) VALUES
( 'circ.user_
'Circ: Patron Merge Deactivate Card',
'Mark barcode(s) of subordinate user(s) in a patron merge as inactive',
'bool'
);
--Error indicated that these org setting types (names) already exist; I commented these lines out to bypass these inserts since they were in the transaction block and prevented other changes.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Going through these in order ...
========== language_ map;
DROP TABLE config.
– Error because tables linked to this table; used CASCADE to drop linked tables.
*** This should have succeeded, because of the preceding:
ALTER TABLE config.i18n_locale DROP CONSTRAINT i18n_locale_ marc_code_ fkey;
*** In fact, since you dropped the i18n_locale table you'll probably have other issues.
==========
INSERT INTO metabib.record_attr (id,attrs) ...
*** Not distinct enough, so changing to:
INSERT INTO metabib.record_attr (id,attrs) '::TEXT[ ] FROM metabib. rec_descriptor mrd;
SELECT DISTINCT ON (mrd.record) mrd.record, hstore(mrd) - '{id,record}
==========
New circ.user_ merge.delete_ addresses YAOUS and friends not new ...
*** Moving these to after the COMMIT
==========