Hi there.
We have a GN 2.6.4 running with a db in PostgreSQL 9.1.4 (with the PostGIS
addon, though the db connection defined in config.xml is of PostgreSQL sort,
i.e no spatial index), and we'd like to update it to 2.10(.2). GN is running
in a Tomcat.
/Method A/ is exporting metadata from 2.6.4 via *GAST*, running 2.10.2 and
let it initialize a new db, then batch import the metadata records with the
web ui. That works, but althogh the MEF format does appear to store info
about cats and groups for each post, the categories and groups and users etc
are not stored, and anyways when doing batch import you select one group and
one category for all the MEFs being imported? Which would mean setting them
manually for each post afterwards I guess?
-----
So we looked into /Method B/, which is running 2.10.2, configure it to
connect to the existing db, but first running the migrate scripts in
/classes/setup/sql/migrate. (If the scripts aren't run manually they will be
run automatically upon first launch of GN, however something goes amiss and
the number of tables are not updated to the 34 that 2.10.2 will create in an
empty db, two or three are missing. The error when GN is started is "Raised
exception while starting appl handler. Skipped.").
When running the scripts manually (from /sql/migrate/v265/ to /v210,
migrate-db-postgresql.sql when available and always migrate-default.sql) the
v280 and v210 migrate-default.sql fail (the others do not).
V280 migrate-default.sql fails with "ERROR: duplicate key value violates
unique constraint "categories_pkey"
DETAIL: Key (id)=(11) already exists." and that's because a user-defined
cat resides there. Removing 11, 12 and 13 involved removing records from
categoriesdes and metadatacateg. That might be explainable, but next INSERT
INTO Settings VALUES (722,720,'enableSearchPanel','false'); is attempted,
and this fails because Key (id)=(722) already exists, and the row is:
722;2;"node";"csw", and not easily removed since "722" is used as a parent
id in the same table in multiple locations.
Further, the tables "requests" and "params" are in the create-db-postgresql
script, but they are not in any migrate script.
Does anyone have any helpful hints?
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/2-6-4-to-2-10-2-Postgresql-migration-scripts-fail-and-MEF-means-quite-a-lot-of-manual-intervention-a-tp5085782.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.