Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Database did not upgrade

Database did not upgrade

Views: 3,903

Results 1 to 20 of 29
15 Mar 2013, 10:41 PM
#1
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Database did not upgrade

I'M IN BIG TROUBLE. Everything was going well until it came time to move my db from a windows server to my new Linux cart 1.5.1

I couldn't update the db because the php was too old

SO....I exported the db and imported it into the new on the Linux then uploaded the zc_install to run the upgrade.

The only errors I got were that a table already existed or was already deleted. It said it ran some statements but I'm not seeing some of the things that were in the Admin when I first installed on the Linux. Some options are missing that I noticed before I dropped the new tables before the import of the old.

Any ideas? WE have a busy store and it is down now it seems for the weekend :( ...and that means all be here too...

15 Mar 2013, 11:17 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database did not upgrade

You setup ZenCart on the linux server
I recall that you were installing plugins
Did any of them include any install sql files??
If so, you will need to re-run them after importing your database backup
Unless the same plugin version was installed on the windows server

Some options are missing that I noticed before I dropped the new tables before the import of the old.
What options??

15 Mar 2013, 11:24 PM
#3
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

thanks for jumping on this....

In Configure > Stock > there were many more options than in 1.3.9h

my old admin shows these options. Am I crazy? I saw about twice as many attribute options.

What is happening is that none of my attributes are showing up for the products in the new cart. THey are there in the db however. The admin does say itis running 1.5.1

Check stock level
Subtract stock
Allow Checkout
Mark product out of stock
Stock Re-order level
Show available stock level in cart when less than order
Display Images in Admin
Products status in Catalog when out of stock should be set to
Show Sold Out Image in place of Add to Cart
Product Quantity Decimals
Show Shopping Cart - Delete Checkboxes or Delete Button
Show Shopping Cart - Update Cart Button Location
Show New Products on empty Shopping Cart Page
Show Featured Products on empty Shopping Cart Page
Show Special Products on empty Shopping Cart Page
Show Upcoming Products on empty Shopping Cart Page
Show Notice of Combining Shopping Cart on Login

15 Mar 2013, 11:30 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database did not upgrade

So are these what you see now OR what you see in your old shop??

15 Mar 2013, 11:44 PM
#5
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

Old shop 1.3.9h...

I had successfully installed an imperfect mod that is no longer showing in the drop down in admin since I ran the Zen db upgrade. I've uninstalled and reinstalled the mod's table from the db thinking it must have something to do with my attributes not showing in the shopping cart. They are all there in the db tables but the mod is not showing in the drop down in the admin and the features are not showing in the cart.

16 Mar 2013, 12:11 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database did not upgrade

What mod??

16 Mar 2013, 12:29 AM
#7
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

27 degrees out....and I'm in a big drafty building...so cold...

It does seem to be a template issue on the store side.

Now that i'm properly using the override system I see that when I change the template all the attributes show up in the cart....but still no drop down in the admin.

I just deleted all the mods files..a version of SBA for 1.5.1 that is still be worked on but is the best version yet. I double checked for errors and re uploaded them. Dropped the SBA table and re ran the sql. Imported my old SBA table.

It worked so more-perfectly-as-expected on a clean install on the Linux with 1.5.1 but it still won't show in the admin no matter what template I choose....and it seems to have knocked out the normal attribute functions of zen showing in the store.

Maybe I'm just too cold and tired.....my eyes have been glued to this all day...just did not want to be down over the weekend...but I have to stop now and come in tomorrow.

THanks so much for hanging in there with me....

16 Mar 2013, 5:15 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Database did not upgrade

The subject you gave to this discussion of "Database did not upgrade" doesn't really match the symptoms you describe.
Am I correct in reading that perhaps "Some admin menu options missing" is more correct?

Or am I missing something?

The admin menu was fully rebuilt between v1.3.9 and 1.5.x. All addons which had admin menu options needed to be updated to work with the new system. Perhaps you've got a hybrid of old admin things that are breaking it and preventing the new admin menu from working properly.

16 Mar 2013, 6:16 PM
#9
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

Hi ....apologize for mis-naming but that was my best perception.

I spent a few days working in my new install of 1.5.1 on a Linux server this week and followed your move from Windows to Linux instructions regarding the import of my old db to the new:

http://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation-to-another-host-or-a-different-server

In January, when I played with upgrading in a trial run, I recalled the database upgrade process being somewhat different that what I experienced when it came to the real deal yesterday, and when I logged in and the admin looked like my old shop and the mods I installed were no longer there and any attribute features were missing from the live store and I needed to go live last night, I felt a post was in order. Also, when I tried to drop one of the mod tables to re-import it phpmyadmin said the drop was successful yet the table was still there.

OK...so I believe last night with all my activity the server was lagging behind me for some of these operations I'm doing to re-install mods. I went to change my DNS and 24 hours later it still has not propagated. The company I use for that says they are doing some maintenance...but I haven't had it take so long before.

Multiple issues that I will resolve somehow now that I've given up on going live for the weekend. The one consolation is that the store speed has significantly improved, even with my import of my old database. I'll post back when i resolve this.

OK...one question: I admit I skipped a step in above instructions, namely: "Grab the "Fix_Cache_Key" utility to reset your Admin->Sessions->Session Directory key so that it uses the proper folder path for your new server" as I did not understand it's use. Could that have been in issue in all this?

16 Mar 2013, 7:31 PM
#10
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

DrByte,

if my old database had info in it that was not compatible with the new zencart it could break it?

I did not use any of my old files from the windows zencart. I did a clean install of 1.5.1 and installed all my mods to make sure they worked. It was beautiful....I even imported some tables from the old db, namely the products tables and the customer's tables, to see how SBA and Edit orders behaved and all seemed so well.

I don't recall now if the cart broke when I imported my old db tables but my recollection is it broke when I ran the zc_install to update the db. All the data is in the tables. All my mods are gone from Admin. My attempts to re-install the mods have been unsuccessful.

I don't know what to do. I'm inclined to create a new db and try and import one table at a time and not run the zc_install at all.

16 Mar 2013, 7:32 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Database did not upgrade

athena:

Multiple issues that I will resolve somehow now that I've given up on going live for the weekend.I didn't say this before, but I'm especially puzzled now since you've mentioned it: You're attempting to do way too much all at once. DNS propagation is never instantaneous (although there are advanced ways to minimize risks of downtime, unless you had the forethought to adjust TTLs a few days ahead and reset them after migration) so you should never attempt a move and upgrade at the same time.
It would have been much better to simply keep the old site live until your new site was ENTIRELY ready and tested. Then once you were ready to "go live", you could THEN down-for-maintenance, copy the database, import it, upgrade it, apply any necessary adjustments for mods and customizations, do some last minute testing and then flip the DNS over.
All explained at http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

Moving AND making big changes (including upgrading) AT THE SAME TIME is ... well ... something I'd only tackle if it was an emergency. But you just now said you've been planning it for a couple months, so rather than hold my tongue I figured it best to share my recommendation based on much experience.

athena:

OK...one question: I admit I skipped a step in above instructions, namely: "Grab the "Fix_Cache_Key" utility to reset your Admin->Sessions->Session Directory key so that it uses the proper folder path for your new server" as I did not understand it's use. Could that have been in issue in all this?Not likely. Usually the symptoms from that are inability to log in.

16 Mar 2013, 7:38 PM
#12
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

I think I was posting when you were posting.....see above your post....

Yeah, I thought that was what I was doing. as i just posted, i did not use any of the old files from 1.3.9h. Just my database from the old zencart was imported.

16 Mar 2013, 7:39 PM
#13
drbyte avatar

drbyte

Sensei

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

Re: Database did not upgrade

athena:

if my old database had info in it that was not compatible with the new zencart it could break it?Loaded question. I don't think you're saying what you really mean.

Your old version's database, when imported, is not immediately compatible with the new version, until after you run zc_install to upgrade it.
If your question was really whether data added by old plugins would cause a problem, the answer is no. You can remove any useless data manually at a later time.

athena:

I even imported some tables from the old db, namely the products tables and the customer's tables,Selectively copying individual tables from the old database WITHOUT FIRST UPGRADING the database, will potentially result in compatibility problems. I NEVER RECOMMEND COPYING INDIVIDUAL TABLES BETWEEN DATABASES as a shortcut or fasttrack or magic trick. Always import the ENTIRE database, so that ALL the data is preserved.

athena:

I don't know what to do. I'm inclined to create a new db and try and import one table at a time and not run the zc_install at all.
Strongly not recommended.

If you're merely missing menu items from the admin, then that will require special focused investigation. Is that the ONLY problem you're actually having now?

16 Mar 2013, 8:07 PM
#14
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

My cart is still running on the old windows but is down for maintenance.

New cart is down for maintenance, functioning, but is missing attributes in the product info page, and is not calculating stock properly at check out. I just checked out with all five of something and it adjusted only to showing four in stock, subtracting only one. This was working beautifully before I tried to update the db.

I successfully installed mods before importing my db: Sales Report (now Missing from admin) zenlightbox (missing but working) SBA (missing not working) Edit orders (missing from config menue but seems to be working) Payment and shipping mods are there and working. Info at a glance (working) Ordered steps (working) Cash on Pickup (working)

Try as I might I can not get SBA to re-install or phpmyadmn to accept any sql statements - keeps saying everything is there. The files are there...the db table is there. i've deleted and uploaded the files again and again over several hours from last night through today at least three separate sessions.

If I could have run the db upgrade on my windows server maybe this all would have been avoided.

I'm wondering if I just create new db and point my zencart to it do I need to run the install?

16 Mar 2013, 8:13 PM
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database did not upgrade

I successfully installed mods before importing my db
If any of your mods had sql for them - importing your database wiped them out and they will need to be re-run

16 Mar 2013, 8:20 PM
#16
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

your already answered that...sorry.....> Your old version's database, when imported, is not immediately compatible with the new version, until after you run zc_install to upgrade it.

It just all seems corrupted now.

16 Mar 2013, 8:50 PM
#17
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

You know....the phpmyadmin just will not successfully run any of the sql files for these mods.

I really need a proceedure for getting my old data into a new 1.5.1 zencart.

Because the php is old on my windows server I can't upgrade there. I integrated all my modifications into 1.5.1 and it is sound. I tested it and it is sound.

The old db just won't play nice and the zc_install upgrade did not seem to work.

I need a proceedure to follow that does.

If I just have the host move everything for me, all the old files and old db....then I guess i could run the zc_install db upgrade and then delete all my old files off the server and upload my 1.5.1...am I missing something here????? That seems stupid and redundant and like I'll be left with the same issues.

16 Mar 2013, 9:03 PM
#18
drbyte avatar

drbyte

Sensei

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

Re: Database did not upgrade

athena:

You know....the phpmyadmin just will not successfully run any of the sql files for these mods."will not successfully run"? Does it give a particular error message?

athena:

I really need a proceedure for getting my old data into a new 1.5.1 zencart.Export from old server, then import to new server.

athena:

If I just have the host move everything for me, all the old files and old db....then ...
If you engage your host to do it, then I'd strongly suggest you stop at the point of them copying the database and files over. Nothing more. Details here: http://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation-to-another-host-or-a-different-server

16 Mar 2013, 9:30 PM
#19
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Database did not upgrade

how does the zc_install upgrade the db?

Is there a list of things it does?

Is there a sql script to do this? (My host asked if they could try and run it for me or figure out what went wrong)

16 Mar 2013, 9:46 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Database did not upgrade

I am almost 100% certain the problem is NOT zc_install. My only uncertainty lies in the fact that I'm going only on symptoms you've posted about.

There's more to the upgrade than merely running a batch of SQL statements. Some are also run dynamically by PHP code which validates certain data and makes updates based on what it discovers is needed. But, if you and your host want to tackle it, have at it. /zc_install/sql/ contains the basic upgrade sql. The dynamic PHP stuff isn't as easily extracted. Your efforts should be considered as RESEARCH ONLY and not as something that results in a live site after experimentation.