Topic: 2.3 RC1 upgrade issues

Hi, trying to upgrade FA from 2.2.11 -> 2.3 RC1.

Getting stuck at the database upgrade section.

When installing I get the error....

SQL script execution failed in line 86: Incorrect integer value: '' for column 'length' at row 1

Looking at the alter2.3.sql file at line 59...

INSERT INTO `0_sys_prefs` SELECT 'postal_address','setup.company', 'tinytext','', c.postal_address FROM `0_company` c;

The issue would seem to be that the tinytext length is set to a '' string and not an integer. If I set this to NULL it moves past this error and gets stuck again at another tinytext further down the file.

Is it OK to set these to NULL or should they have a value.... ?

Any other solutions gratefully received smile

Thanks in advance.....
Cheers, Steve

Re: 2.3 RC1 upgrade issues

Just seen RC2 is release... tried to upgrade but the same issue is present...

Re: 2.3 RC1 upgrade issues

Probably you have MySQL running in strict mode. Please change '' to '0' in lines 59 and 86 in file sql/alter2.3.sql. We will fix this issue in final 2.3. Thanks for pointing this out.
Janusz

Re: 2.3 RC1 upgrade issues

Thanks Janusz, this worked ok but now it has tripped up on a couple more issues.

The first is the update_totals section of the alter2.3.php. This section fails with....

FATAL : sales order return nothing - etc etc.

...when trying to update the second company database I think due to this sql....

SELECT sorder.*, cust.name, cust.curr_code, loc.location_name, cust.discount, stype.sales_type, stype.id AS sales_type_id, stype.tax_included, ship.shipper_name, tax_group.name AS tax_group_name , tax_group.id AS tax_group_id FROM 0_sales_orders sorder, 0_debtors_master cust,0_sales_types stype, 0_tax_groups tax_group, 0_cust_branch branch,0_locations loc, 0_shippers ship WHERE sorder.order_type=stype.id AND branch.branch_code = sorder.branch_code AND branch.tax_group_id = tax_group.id AND sorder.debtor_no = cust.debtor_no AND loc.loc_code = sorder.from_stk_loc AND ship.shipper_id = sorder.ship_via AND sorder.trans_type = '30' AND sorder.order_no = '1'

It looks like there is a table prefix issue here because even for the second company the sql it trying to select from company 0_

The var TB_PREF seems to come from the logged in user (which when upgrading is 0_) and there seems to be other references to it which generates these errors in the error.log....

[12-Oct-2010 07:28:36] 0:admin:cart_class.inc:403:[before upgrade] Invalid argument supplied for foreach()
[12-Oct-2010 07:28:36] 0:admin:cart_class.inc:463:[before upgrade] Invalid argument supplied for foreach()

Also another issue seems to be with the trans_link column as below.

DATABASE ERROR : Parent document numbers cannot be retrieved
error code : 1054
error message : Unknown column 'trans_link' in 'field list'
sql that failed was : SELECT trans_link FROM 0_debtor_trans WHERE trans_no='5' AND type='10' AND trans_link!=0

...this I got round by deleting the call to drop the trans_link column in the alter2.3php and assume I can drop the column after the upgrade.

Welcome your thoughts.
Cheers, Steve

Re: 2.3 RC1 upgrade issues

Regarding the first error, seems you have found serious problem in upgrade routine.  I will post to this thread when I find solution to this issue. Thanks for pointing out the problem.
Janusz

Re: 2.3 RC1 upgrade issues

I have just fixed the problem. Unfortunately a couple of files has changed, so maybe the best way to continue testing is to upload them from CVS unstable branch. All the changed files are listed in CHANGELOG.txt.

Thank you again for pointing out this overlooked problem.

Janusz

Re: 2.3 RC1 upgrade issues

Many thanks Janusz, I'm not setup for CVS and as I use windows, looks a bit of a pain to configure.... Is there any way of getting the code I need or do you know when the next stable release will be put out?

Thanks in advance
Cheers, Steve

Re: 2.3 RC1 upgrade issues

Hi Janusz,

This now works perfectly except for the following couple of field issues.

SQL script execution failed in line 225: Field 'name' doesn't have a default value
--------------------------------------------------------------------------------
SQL script execution failed in line 230: Field 'notes' doesn't have a default value
--------------------------------------------------------------------------------

In alter2.3.sql I added the name and notes fields on lines 225, 230, and 235.

All worked after that.

Many thanks for your help.
Cheers, Steve