Forums / Upgrading from 1.2 to 1.3.x / Fresh Install w/ Database Upgrade

Fresh Install w/ Database Upgrade

Locked

Started by audradh on 21 Jan 2007, 2:50 AM · Views: 4,767

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
21 Jan 2007, 2:50 AM
#1
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Fresh Install w/ Database Upgrade

I have found other posts looking to do this, but have not found an answer yet.

I am upgrading from 1.2.6 to 1.3.7

I have decided to do a fresh install, not only for the usual reasons. I am also hoping to cleanse my cart of some quirks, no doubt caused by newbie mistakes. Because of this I really want to rebuild from the ground up, bringing forward only data.

The thing I cannot quite figure out is how to compare my old 1.2.6 database to a freshly installed 1.3.7 database and then rid it of extra tables and fields added through cart mods.

I have done a fresh install of 1.3.7.
Exported both databases and have them available as .sql and text files.
Comparing the files looks like a pretty daunting task given my level of knowledge. I'm willing to do it, but I'm not so sure that I'm capable.

If I import the 1.2.6 over my fresh 1.3.7 database, and then upgrade the database, the data seems to import alright. But, that still leaves bogus tables and fields related to mods that I installed hanging around in my database.

How can I identify the differences? I figure that if I can identify the differences I can rid the file of them before importing it over my fresh 1.3.7 database.

Or is this the million dollar question???

Thanks!
Audra

21 Jan 2007, 3:39 AM
#2
kobra avatar

kobra

Black Belt

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

Re: Fresh Install w/ Database Upgrade

Don't know what mods you have installed nor what tables they might have created.
A fresh 1.3.7 DB should have 93 tables if you have more try to determine which ones they are.

If you look at the mods and determine that one or more has altered an existing table make note of this and depending on what table this was you might be able to exclude it when making your backup for moving along with any that are not part of the 93.

Zen-Venom Get Bitten

21 Jan 2007, 3:44 AM
#3
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

Yeah, excluding additional tables is easy enough. It's the altered tables that concern me. I hate to work it from the mod end in case I forget anything. Since I'm trying to rid the cart of newbie mistakes I made, I'm sure that my documentation, as I muddled through it, was less than admirable :blush:

21 Jan 2007, 3:53 AM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Fresh Install w/ Database Upgrade

what modules do you have installed?
do you need all of them in the new cart?
If your looking at doing a fresh install,
the easiest thing I can say is to make a copy of the DB,
then run the upgrader using zc_install,
now copy all product, category customer and order table,

and run the drop table and insert statements in the New Stores database

Zen cart PCI compliant Hosting

21 Jan 2007, 3:56 AM
#5
kobra avatar

kobra

Black Belt

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

Re: Fresh Install w/ Database Upgrade

If you look at the tables like in phpmyadmin - there are specific tables that you are going to want to include like(no where a complete list) any products tables, all attribute tables, all customer tables, order tables, etc.

The config table and others can/will be reconstructed in your fresh install Do you have a list of the tables that the mods altered?

Zen-Venom Get Bitten

21 Jan 2007, 4:31 AM
#6
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

So, the more I think about this, the more I think I am worrying too much.

For now I will bring in the obviously needed old data, customers, products, etc.

As I re-mod my cart, if I realize that I needed some data it is always still there to pull from the old database.

My goal is to bring along as little baggage as is necessary, so rather than pack up everything then try to sort through it, I will only pack what I need knowing that I can always have anything I forgot Fedexed overnight :yes:

Thanks kobra and Merlin for helping me to get my head on straight w/ this.

Audra

21 Jan 2007, 7:09 AM
#7
kobra avatar

kobra

Black Belt

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

Re: Fresh Install w/ Database Upgrade

Just keep track of the required tables...as when you are ready to convert to the new shop, you will want to take a new back of this data to capture the customers and orders etc that have been placed in the interim.

Zen-Venom Get Bitten

21 Jan 2007, 1:47 PM
#8
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

Good point, thank you!

22 Jan 2007, 2:23 AM
#9
tcustomgolf avatar

tcustomgolf

Inactive

Join Date:
Dec 2005
Location:
NY
Posts:
162
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

I went into phpmyadmin and through screenshots compared the tables in 1.2.7 to 1.3.7. There were a couple of new tables, like for EZPages. The other differences were usually having to do with contribs.

If the table structure, etc. did not change through new versions of the contrib, then they can be brought over also if you want them in the new version, along with their data. Then you would re-install the contrib in 1.3.7, but not the sql patch file since the table is already there.

Custom Golf Clubs - A ZenCart Site!
Get fitted online for a better game!

23 Jan 2007, 5:45 AM
#10
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

Merlinpa1969:

what modules do you have installed?
do you need all of them in the new cart?
If your looking at doing a fresh install,
the easiest thing I can say is to make a copy of the DB,
then run the upgrader using zc_install,
now copy all product, category customer and order table,

and run the drop table and insert statements in the New Stores database

So, I've done this (I think.)

Fresh 1.3.7 install
Mods added (thanks Merlin)
Exported select tables from 1.2.6 database selecting Add DROP TABLE and Insert
Imported above sql file into new 1.3.7 database

After importing the data, do I need to upgrade the db using zc_install?
I was originally thinking that I had to, but now I can't figure why I thought that.

Thx,
Audra :smile:

23 Jan 2007, 7:12 AM
#11
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

I see my mistake. I should have done an upgrade on the 1.2.6 database before exporting the tables.

Live and Learn.

23 Jan 2007, 11:00 AM
#12
kobra avatar

kobra

Black Belt

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

Re: Fresh Install w/ Database Upgrade

I see my mistake. I should have done an upgrade on the 1.2.6 database before exporting the tables. AND
After importing the data, do I need to upgrade the db using zc_install?
I was originally thinking that I had to, but now I can't figure why I thought that.
The normal - recommended method is to install 2nd instance oc ZC with new db - to this import the current DB and re-run zc_install.

Upgrading the live DB defeats keeping the store live....

But recall that you wished to eliminate some of the DB additions....

Zen-Venom Get Bitten

23 Jan 2007, 12:56 PM
#13
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Fresh Install w/ Database Upgrade

The store is temporarily offline anyway d/t a hosting switch, so that part isn't an issue.

I didn't import the entire 1.2.6 DB, just select tables.

So, would it be alright to run a DB upgrade now on the 1.3.7 DB or do I need to roll back and upgrade the 1.2.6 first?

I would have simply tried doing this last night, but I can't access /public_html after this hosting switch. I don't know the name of the zc_install folder if it still exists anyway - what a mess.

23 Jan 2007, 2:47 PM
#14
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Fresh Install w/ Database Upgrade

While you are right Kobra,
in this instance that wouldnt have worked due to the changes that were made to the installation.

but its ok to go ahead and run the zc Upgrade part on what you have there now,
its not going to hurt anything

Zen cart PCI compliant Hosting