librelist archives

« back to archive

some migrations

some migrations

From:
David Winslow
Date:
2010-05-18 @ 20:40
Hey all,

Two changes that were made today may require migrations of existing 
databases.  The short fix is to just delete your database and run "paver 
build" again to generate it from scratch :) but if you want to hang on 
to your data there are two migration steps you'll want to take.

1: Update GeoServer's metadata link types to have 'TC211' instead of 
'ISO19115' as the metadata type.  This fixes a small bug we already 
have, but existing data may need to be updated.  
http://projects.opengeo.org/CAPRA/ticket/523 describes the problem, and 
has a small Python script attached that can update existing GeoServer 
catalogs.  Note that in development mode, restarting GeoNetwork (not 
GeoServer) and running 'django-admin.py updatelayers 
--settings=geonode.settings' will also resolve this due to GeoNetwork 
not persisting metadata records through a restart.

2. Update the Django database to account for some new fields added to 
the map configuration entries (see 
http://projects.opengeo.org/CAPRA/ticket/524).  These are purely new 
columns on existing tables, and it's fine for them all to be blank, so 
the fix is pretty easy.  Just fire up the appropriate SQL shell (for the 
development sqlite database this is accomplished via "sqlite3 
development.db") and issue the following lines of DDL:

ALTER TABLE maps_maplayer ADD COLUMN "styles" VARCHAR(200);
ALTER TABLE maps_maplayer ADD COLUMN "format" VARCHAR(200);
ALTER TABLE maps_maplayer ADD COLUMN "opacity" REAL;
ALTER TABLE maps_maplayer ADD COLUMN "transparent" BOOL;

Let me know if any issues come up while doing this.

--
David Winslow
OpenGeo - http://opengeo.org/