Thanks Dan,
I noticed talk of 1.4.0.2 late last night and thought I might give
it a try today--great timing!
The import did succeed properly this time, but not without a bit of
coercing. This problem is related to our data and the IDs associated
with our duration rules and recurring fines.
On line 1336 of the 1.2.3 to 1.4 upgrade script a record is inserted
into the 'circ_matrix_ruleset' table. It's a 'static' insert that puts
an ID of 11 for the duration_rule and 1 for the recuring_fine_rule. Our
data doesn't have those IDs in the corresponding tables so the insert
failed (they break a foreign key constraint). I changed the field IDs
to match our 'default' rules and the upgrade completed.
That's probably something for other people upgrading to watch out for.
If they (like us) have been playing around with the circulation rules,
their IDs won't likely be the 'default' expected in that insert query.
Simple fix.
Now on to testing of 1.4.0.2! Great job to all involved.
Dan Scott wrote:
2009/2/10 Garry Dunn <[email protected]>:
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).
Right, stow complains if other stuff is already in conlicting
/usr/local/ directories (/usr/local/man from installing CPAN packages,
for example). It's a nice tool, but not necessary.
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
This is one of the fixes that went into 1.4.0.2.
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.
It sounds like a reasonable upgrade path to me. You will need to
switch from a single-domain to a multi-domain OpenSRF configuration,
FYI.
Any comments/suggestions?
Get 1.4.0.2 and you should be okay. The upgrade path hasn't been
heavily tested, so we would appreciate any further findings that you
might have.
--
Garry Dunn, P.Eng
Trellis Consulting
www.trellisconsulting.ca
705-835-5608 (Office)
905-302-7273 (Cell)