[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First upgrade attempt from 1.2.21 -> 1.3.0RC4 == Fail

On Fri, 7 Oct 2011, Chris Travers wrote:

I am intentionally jetlagged at the moment,. sleeping 4 hours in the
afternoon and 4 at night.  I will probably keep this up for a week,
before deciding to revert totally to local time (Jakarta, Indonesia).

Makes me need a nap just reading it.

It looks like I could 'delete from invoice where trans_id = 16796;' if there
would be no further ramifications.

I added the delete to my fix up every mess I found script which I run against the cloned DB before I apply the 1.2-1.3-manual.sql against it.

This time making it to

INSERT INTO audittrail(trans_id, tablename, reference, formname, action,
            transdate, person_id, entry_id)
     SELECT trans_id, tablename, reference, formname, action,
            transdate, p.id, entry_id
       FROM lsmb12.audittrail a
       JOIN lsmb12.employee e ON a.employee_id = e.id
       JOIN person p on e.entity_id = p.entity_id;

psql:sql/upgrade/1.2-1.3-manual.sql:582: ERROR: insert or update on table "audittrail" violates foreign key constraint "audittrail_person_id_fkey"
DETAIL:  Key (person_id)=(1) is not present in table "person".

I think I am going to leave this last issue out of hte automatic error
detection scripts.  It's probably a good one for people to get some
help with (either paid support or a second set of eyes on the lists,
etc).  Thanks for telling me about the history of this db.  It's not
surprising we are finding some areas where there is orphaned data etc.
Identifying all these issues though is very helpful to the project.

Glad this is helpful, and thank you for the help. I've been holding off trying the upgrade because I expected a ton of old weirdness to pop up. When RC4 came out I figured it was a good time to test the upgrade.