[OPEN-ILS-DEV] Upgrade 1.2.3 to 1.4 problem

Garry Dunn garry at trellisconsulting.ca
Tue Feb 10 20:33:55 EST 2009


I'm in the process of setting up a new test server using Ubuntu 8.04
and the instructions on the website.  I can get everything running with
a blank database (with some minor deviations to get PostGres8.2 compiled
from source--stow was giving a 'conflict', so I installed without it). 
the staff client and OPAC both work fine (albeit with no data).

Now I want to get our data from our live 1.2.3.1 system into this
test system.  Our live system is running PostGres 8.1 (slap me--we
didn't know we were supposed to run 8.2!).  I've got a PG_DUMP of the
entire database.  Before importing that, I create a blank database and
run the 3 'createlang' commands and the tablefunc/tsearch2/pgxml
contribs.  The PG_DUMP imports into this new PG 8.2/Ubuntu system 
without major problems (the warnings are about the tsearch2 tables 
existing already--which makes sense, I thought it might be wise to have 
the 8.2 tsearch2 version, rather than the 8.1 that will get imported).

Then I try running the upgrade script.  After a bunch of successful
updates to the database, it fails with:

psql:/home/opensrf/Evergreen-ILS-1.4.0.1/Open-ILS/src/sql/Pg/1.2.3-1.4-upgrade-db.sql:1586:

ERROR:  syntax error at or near "IF" LINE 1:
...('MAXFINES','LONGOVERDUE') OR stop_fines IS NULL) IF  $4  >=...
                                                              ^
QUERY:  SELECT COUNT(*) FROM action.circulation WHERE usr =  $1  AND (
$2  IS NULL OR ( $2  IS NOT NULL AND circ_lib IN ( SELECT * FROM
explode_array( $3 ) ))) AND checkin_time IS NULL AND (stop_fines IN
('MAXFINES','LONGOVERDUE') OR stop_fines IS NULL) IF  $4  >=  $5  THEN
$6  := 'config.circ_matrix_test.max_items_out'
CONTEXT:  SQL statement in PL/PgSQL function "item_user_circ_test" near
line 105

I'm wondering if I'm going at this in the right way.  It's probably not 
the normal upgrade path, but we like the idea of having a nice clean 
install and bringing our data into that.

Any comments/suggestions?

Garry


More information about the Open-ils-dev mailing list