[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 Thu, Oct 6, 2011 at 7:56 PM,  <..hidden..> wrote:
>
> Well made it a little further:
>
> INSERT INTO users (entity_id, username)
>      SELECT entity_id, login FROM lsmb12.employee em;
>
> psql:sql/upgrade/1.2-1.3-manual.sql:385: ERROR:  null value in column
> "username" violates not-null constraint
>
> I figured out a fix for this one and tried again making it to

Fixing this.
>
>
>
> INSERT INTO invoice (id, trans_id, parts_id, description, qty, allocated,
>             sellprice, fxsellprice, discount, assemblyitem, unit, project_id,
>             deliverydate, serialnumber, notes)
>     SELECT  id, trans_id, parts_id, description, qty, allocated,
>             sellprice, fxsellprice, discount, assemblyitem, unit, project_id,
>             deliverydate, serialnumber, notes
>        FROM lsmb12.invoice;
>
>
> psql:sql/upgrade/1.2-1.3-manual.sql:474: ERROR:  insert or update on table
> "invoice" violates foreign key constraint "invoice_trans_id_fkey"
> DETAIL:  Key (trans_id)=(16796) is not present in table "transactions".
>
> Which I can't quite figure out since it seems transactions is empty.

Checking this out.  I think this is done in a transaction so it would
roll back.  But check to see if there is an RI issue here:

SELECT trans_id FROM invoice WHERE trans_id NOT IN (select id in ar
union select id from ap);

Best Wishes,
Chris Travers