Forums / Upgrading to 1.5.x / ZC Database upgrade from 1.3.9 to 1.5.5

ZC Database upgrade from 1.3.9 to 1.5.5

Views: 1,827

Results 1 to 5 of 5
29 Apr 2016, 2:05 PM
#1
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

ZC Database upgrade from 1.3.9 to 1.5.5

Hi All

I'm upgrading my site from 1.3.9h to 1.5.5.

I've created a new dev site with fresh install of 1.5.5, then I modified configure.php file, and point to my old 1.3.9h database. I visited /zc_install to upgrade the database, but the database is wrongly detected as version 1.5.3., while it should be 1.3.9h


The following list shows the various upgrade steps we detected are required for your database.
Please confirm your desired upgrade steps
1.5.3 to 1.5.4
1.5.4 to 1.5.5

I've tried checked both two checkboxes (from 1.5.3 to 1.5.4 and 1.5.4 to 1.5.5), and after the upgrade finished, I was told I need to upgrade my database from 1.3.9 to 1.5.0, but this time when I run zc_install again, I don't see the upgrade database button

My questions:

  1. How is the db version being detected? Is it based on the project_version and project_version_history tables in database? I saw the project_version_minor filed for "Zen-Cart Database" key in both two tables is 3.9d (I've upgrade zc from 1.3.9d to 1.3.9h long time ago, seems I forgot to upgrade the database at that time)

  2. I've modified the original 1.3.9 database, e.g. increase the size of product_name, add more fields. Will these changes be affected by the database upgrade?

Thanks
Davis

29 Apr 2016, 4:17 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC Database upgrade from 1.3.9 to 1.5.5

The database is detected by looking for a number of things that were added to (or structurally changed in) the database for each version step.
That way it's not affected by other changes you've made, so that it can preserve the things you've changed.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Apr 2016, 4:22 AM
#3
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: ZC Database upgrade from 1.3.9 to 1.5.5

Thanks Dr. Byte.
I found the database update sql under zc_install\sql, can I manually execute these sqls via phpmyadmin?
The issue is zc_install can't detect my current zc db version correctly.

30 Apr 2016, 4:54 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC Database upgrade from 1.3.9 to 1.5.5

y051313:

I found the database update sql under zc_install\sql, can I manually execute these sqls via phpmyadmin?
The issue is zc_install can't detect my current zc db version correctly.
It's NOT ideal, but yes you can if your DB_PREFIX is blank. Otherwise you'll need to manually edit every tablename in every statement. But then you miss out on some important cleanups that are done at the PHP level too.
Doing it that way is NOT a good idea .... especially since the only reason it wouldn't detect the database version properly is if there are actually problems that should be fixed first.

The detections are defined in the zc_install/includes/systemChecks.yml file, and outline which fields in which tables are expected to be present and with what schema and what value.

I suspect some errors are found in the /logs/zc_install-DEBUG.log files on your server. It would be worth investigating and fixing those issues, instead of forcing things in manually.
Plus, if there's a bug that we could fix so that others don't have the same problem, we'd like to fix it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Apr 2016, 5:09 AM
#5
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: ZC Database upgrade from 1.3.9 to 1.5.5

Thanks

I checked zc_install\includes\systemChecks.yml, and found the reason db version check fails is due to I used a localized version of zencart 1.3.9, and the "configuration_title" value for filed "SHOW_SPLIT_TAX_CHECKOUT" was in Chinese instead of "Show Split Tax Lines" as expected.

After change this value, now zc_install can detect the db version correctly.

Thanks very much for your help