[webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

eculp


I have been trying to upgrade a 3.01 installation to 3.02 cvs updated
this morning with all new files, nothing from the 3.01 installation.  I
immediately tried to upgrade the database.

I first tried with

# mysql databasename < upgrade3.01-3.02.sql

and it gave tme the following error: ERROR 1216 (23000) at line 110:
Cannot add or update a child row: a foreign key constraint fails
---------------------------------------

I droped the database and recreated it from the backup and tried
Z_Upgrade_3.01-3.02.php with the original 3.01 database and get:

Database Error :
Multiple primary key defined

Database SQL Failure : The SQL that failed was
ALTER TABLE salesorderdetails ADD CONSTRAINT salesorderdetails_pk
primary key(orderno, orderlineno)

--------------------------------

Any suggestions as to where to look?  BTW, while taking a break I ran
Z_CreateNewCompany.php and it works as expected.  The only thing I
can't do is migrate the data from 3.01.

Thanks, ed


Any ideas on what I might have done wrong.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
web-ERP-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-users
Reply | Threaded
Open this post in threaded view
|

Re: [webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

weberp
Using phpMyAdmin drop the primary key on salesorder details or run

ALTER TABLE salesordersdetails DROP Primary Key;

Phil


On Fri, 23 Sep 2005 03:10, [hidden email] wrote:

> I have been trying to upgrade a 3.01 installation to 3.02 cvs updated
> this morning with all new files, nothing from the 3.01 installation.  I
> immediately tried to upgrade the database.
>
> I first tried with
>
> # mysql databasename < upgrade3.01-3.02.sql
>
> and it gave tme the following error: ERROR 1216 (23000) at line 110:
> Cannot add or update a child row: a foreign key constraint fails
> ---------------------------------------
>
> I droped the database and recreated it from the backup and tried
> Z_Upgrade_3.01-3.02.php with the original 3.01 database and get:
>
> Database Error :
> Multiple primary key defined
>
> Database SQL Failure : The SQL that failed was
> ALTER TABLE salesorderdetails ADD CONSTRAINT salesorderdetails_pk
> primary key(orderno, orderlineno)
>
> --------------------------------
>
> Any suggestions as to where to look?  BTW, while taking a break I ran
> Z_CreateNewCompany.php and it works as expected.  The only thing I
> can't do is migrate the data from 3.01.
>
> Thanks, ed
>
>
> Any ideas on what I might have done wrong.
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> web-ERP-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-users

--
Phil Daintree
webERP Project Admin


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
web-ERP-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-users
Reply | Threaded
Open this post in threaded view
|

Re: [webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

eculp@unixmania.com
Quoting Phil Daintree <[hidden email]>:

> Using phpMyAdmin drop the primary key on salesorder details or run
>
> ALTER TABLE salesordersdetails DROP Primary Key;
>

That didn't do it for me but I was finally able to use the

mysql databasename < upgrade3.01-3.02.sql

script successfully.  I found a solution that I would assume is because
of my version of MySQL 4.1.14 but am not sure.  All I had to do was add
and enclose the script with what would seem to be compatability lines,
but since my knowledge of mysql on a scale of 1 to 10 would be about a
-3, I am only making a totally unknowledgeable guess.

My next problem is with taxes.  When I try to enter a suppliers invoice
under supplier transactions, I am getting:

Database Error : The taxes and rates for this item could not be
retreived because
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near 'ORDER BY
taxgrouptaxes.calculationorder' at line 14

Database SQL Failure : The SQL that failed was
SELECT taxgrouptaxes.calculationorder, taxauthorities.description,
taxgrouptaxes.taxauthid, taxauthorities.purchtaxglaccount,
taxgrouptaxes.taxontax, taxauthrates.taxrate FROM taxauthrates INNER
JOIN taxgrouptaxes ON taxauthrates.taxauthority=taxgrouptaxes.taxauthid
INNER JOIN taxauthorities ON
taxauthrates.taxauthority=taxauthorities.taxid WHERE
taxgrouptaxes.taxgroupid=1 AND taxauthrates.dispatchtaxprovince=1 AND
taxauthrates.taxcatid = ORDER BY taxgrouptaxes.calculationorder

I assume that I am missing some of the new tax information and added
some info in the taxgrouptax tables but didn't change.

Could this be because I did a manual upgrade rather than using
Z_Upgrade_3.01-3.02.php ?

Thanks,

ed





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
web-ERP-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-users
Reply | Threaded
Open this post in threaded view
|

Re: [webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

eculp@unixmania.com
Quoting [hidden email]:

> Quoting Phil Daintree <[hidden email]>:
>
>> Using phpMyAdmin drop the primary key on salesorder details or run
>>
>> ALTER TABLE salesordersdetails DROP Primary Key;
>>
>
> That didn't do it for me but I was finally able to use the
>
> mysql databasename < upgrade3.01-3.02.sql
>
> script successfully.  I found a solution that I would assume is
> because of my version of MySQL 4.1.14 but am not sure.  All I had to
> do was add and enclose the script with what would seem to be
> compatability lines, but since my knowledge of mysql on a scale of 1
> to 10 would be about a -3, I am only making a totally unknowledgeable
> guess.

I'm attaching the patch that I made against cvs, just in case there is
anyone else with the same problem and that knows as little as I about
the newer mysql version differences.

I still trying to find the error generated when trying to enter a
suppliers invoice.

Thanks,

ed

> Database Error : The taxes and rates for this item could not be
> retreived because
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'ORDER BY taxgrouptaxes.calculationorder' at line 14
>
> Database SQL Failure : The SQL that failed was
> SELECT taxgrouptaxes.calculationorder, taxauthorities.description,
> taxgrouptaxes.taxauthid, taxauthorities.purchtaxglaccount,
> taxgrouptaxes.taxontax, taxauthrates.taxrate FROM taxauthrates INNER
> JOIN taxgrouptaxes ON
> taxauthrates.taxauthority=taxgrouptaxes.taxauthid INNER JOIN
> taxauthorities ON taxauthrates.taxauthority=taxauthorities.taxid
> WHERE taxgrouptaxes.taxgroupid=1 AND
> taxauthrates.dispatchtaxprovince=1 AND taxauthrates.taxcatid = ORDER
> BY taxgrouptaxes.calculationorder
>
> I assume that I am missing some of the new tax information and added
> some info in the taxgrouptax tables but didn't change.
>
> Could this be because I did a manual upgrade rather than using
> Z_Upgrade_3.01-3.02.php ?



-----
Attachments (Links will expire on March 31, 2006)
http://mail.unixmania.com/imp/attachment.php?Horde=qgugq6s74j7vajrsu8b68guco4&u=eculp%40unixmania.com&t=1127737536&f=upgrade3.01-3.02-mysql-4.1.14.sql.patch


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
web-ERP-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-users
Reply | Threaded
Open this post in threaded view
|

Re: [webERP-users] having a hard time updating the 3.01 mysql DB to 3.02.

weberp
In reply to this post by eculp@unixmania.com
This might be because the info required for the new tax system needs to be set
up. Check out the tax provinces - you only need one for each
warehouse/location that are in different provinces if you have a warehouse in
London and one in Liverpool then you only need one (dispatch) tax province -
ie UK Inland Revenue.

Then once you've created a tax province you'll need to define the tax
categories appropriate and the tax groups applicable - ie the groupings of
tax authorities that may apply to a single transaction. Most of us happily
only need to deal with one tax authority tax groups. However, the new 3.02
system needs to be setup to deal with your situation.

Phil

>
> mysql databasename < upgrade3.01-3.02.sql
>
> script successfully.  I found a solution that I would assume is because
> of my version of MySQL 4.1.14 but am not sure.  All I had to do was add
> and enclose the script with what would seem to be compatability lines,
> but since my knowledge of mysql on a scale of 1 to 10 would be about a
> -3, I am only making a totally unknowledgeable guess.
>
> My next problem is with taxes.  When I try to enter a suppliers invoice
> under supplier transactions, I am getting:
>
> Database Error : The taxes and rates for this item could not be
> retreived because
> You have an error in your SQL syntax; check the manual that corresponds
> to your MySQL server version for the right syntax to use near 'ORDER BY
> taxgrouptaxes.calculationorder' at line 14
>
> Database SQL Failure : The SQL that failed was
> SELECT taxgrouptaxes.calculationorder, taxauthorities.description,
> taxgrouptaxes.taxauthid, taxauthorities.purchtaxglaccount,
> taxgrouptaxes.taxontax, taxauthrates.taxrate FROM taxauthrates INNER
> JOIN taxgrouptaxes ON taxauthrates.taxauthority=taxgrouptaxes.taxauthid
> INNER JOIN taxauthorities ON
> taxauthrates.taxauthority=taxauthorities.taxid WHERE
> taxgrouptaxes.taxgroupid=1 AND taxauthrates.dispatchtaxprovince=1 AND
> taxauthrates.taxcatid = ORDER BY taxgrouptaxes.calculationorder
>
> I assume that I am missing some of the new tax information and added
> some info in the taxgrouptax tables but didn't change.
>
> Could this be because I did a manual upgrade rather than using
> Z_Upgrade_3.01-3.02.php ?
>
> Thanks,
>
> ed
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> web-ERP-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-users

--
Phil Daintree
webERP Project Admin


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
web-ERP-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-users