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

Re: upgrade db 1.2 -> 1.3 experiences



On Tue, Oct 18, 2011 at 7:05 AM, herman vierendeels
<..hidden..> wrote:
> Hello,
>
> -- I had to do following extra-steps before being able to upgrade db
> without errors:
>
> dangling acc_trans  ,  invoice
>
>  delete from lsmb12.acc_trans where trans_id in (SELECT trans_id FROM
> lsmb12.acc_trans where trans_id not in (select id from lsmb12.ap union
> select id from lsmb12.ar union select id from lsmb12.gl) group by
> trans_id);
>
>  delete from lsmb12.invoice where trans_id in (SELECT trans_id FROM
> lsmb12.invoice where trans_id not in (select id from lsmb12.ap union
> select id from lsmb12.ar union select id from lsmb12.gl) group by
> trans_id);
>
> Is this something we should check in sql/upgrade/1.2-pre-upgrade-checks.sql ?

Probably a good idea.  Go for it.
>
>
> -- i had to do following extra-step before being able to work with upgraded db:
>
> update parts p set expense_accno_id=(select c.id from chart
> c,lsmb12.chart lc where c.accno=lc.accno and
> lc.id=p.expense_accno_id);
>
> Should we not adapt import of parts in  e.g. sql/upgrade/1.2-1.3-manual.sql
>
> --INSERT INTO parts SELECT * FROM lsmb12.parts;
>
> insert into parts  select
> id,partnumber,description,unit,listprice,sellprice,lastcost,priceupdate,weight,onhand,notes,makemodel,assembly,alternate,rop,inventory_accno_id,income_accno_id,
> --expense_accno_id,
> (select c.id from chart c,lsmb12.chart lc where c.accno=lc.accno and
> lc.id=l12parts.expense_accno_id),
> bin,obsolete,bom,image,drawing,microfiche,partsgroup_id,project_id,avgcost
> person
> from lsmb12.parts l12parts

>
> idem for inventory_accno_id or income_accno_id  ??

yep.  Good catch.  Yeah, go ahead and fix this.

Best Wishes,
Chris Travers