Page 1 of 2

Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Wed Dec 23, 2015 2:34 pm
by Randem
I have not yet perfected the total migration from v1.5.x to 2.1.x but I figured what I have done so far can help others. If you find something missing or have something helpful to add, please feel free to let me know and I could possibly add it to the existing migration to make it better. I have attached the upgrade.php file that you need to place in the install folder.

The full migration direction and upgrade.php file is here

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sun Dec 27, 2015 3:16 am
by soundzgood-nz
Thanks for script - can I suggest that:

line 8:

Code: Select all

$file = DIR_APPLICATION . 'opencart.sql';
is changed to :

Code: Select all

$file = DIR_INSTALL . 'opencart.sql';
as the db structure is in the opencart.sql file in the .install folder, not the /catalog folder.

line 555:

Code: Select all

INSERT INTO `" . DB_PREFIX . "user_group` VALUES(1, 'Top Administrator', 
is changed to :

Code: Select all

INSERT INTO `" . DB_PREFIX . "user_group` VALUES(1, 'Administrator', 
because this will effectively stop an admins from having permission to access anything in the admin area, as 'Administrator' is used in oc2.x not 'Top Administrator' on install!

Simon

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sun Dec 27, 2015 11:43 am
by Randem
Thanks for the catch soundzgood-nz ,

Yeah that was an old version of the upgrade script. I have removed it so that there is only one place to get the script. The TOP_ADMINISTRATOR is correct in the newer script that is found in the link. As for the $file = DIR_APPLICATION . 'opencart.sql'; line. I noticed that early on in testing and just copied the opencart.sql file to the catalog folder instead of changing the install.php file which originally created the config.php file. I forgot to note the change, I will either have to change the install.php file to reflect the install folder or put in the steps that the new DIR_INSTALL define statement needs to be added to the config.php files.

The latest script is in the link in the first post.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sun Dec 27, 2015 12:07 pm
by Randem
I decided to just instruct people to copy the opencart.sql file to the folder that it was incorrectly expected to be in but was not there... I believe this would cause the least amount of confusion for now. This is now the first step in the directions...

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sun Jan 03, 2016 5:01 pm
by Randem
All the latest files needed to upgrade your OpenCart database to work with v2.1.0.1 are listed here

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 08, 2016 7:14 pm
by Randem
Had to make a small change to the upgrade.php file get the latest version.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sat Jan 09, 2016 4:03 am
by vapekrew

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sat Jan 09, 2016 4:37 am
by Randem
Yes, does not work properly, got errors from the start, no documentation, that is why I created this tool...

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sat Jan 09, 2016 12:46 pm
by EvolveWebHosting
I don't know when 2.2 is going to be released but it looks like they are addressing the upgrade issues.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sat Jan 09, 2016 12:53 pm
by Randem
EvolveWebHosting,

That's fine but we had to solve these issues NOW! They could just borrow from what has been done already instead of re-creating the wheel. That is what a forum and open source software is supposed to benefit from.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Sun Jan 10, 2016 12:49 am
by EvolveWebHosting
Randem wrote:EvolveWebHosting,

That's fine but we had to solve these issues NOW! They could just borrow from what has been done already instead of re-creating the wheel. That is what a forum and open source software is supposed to benefit from.
I hear you! I just wanted to point that out. It looks like another significant overhaul for the next version.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Mon Jan 11, 2016 3:37 am
by Randem
Yes, that would help us all... ;D

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 15, 2016 8:50 am
by Randem
Well, v2.1.0.2 was release and it did not address anything of significance...

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 15, 2016 7:22 pm
by dmsims
Randem

Just came to say thank you for your efforts

I followed your guide and tested an upgrade from 1.5.5.1

My only suggestion:

In step 10 where is says "then run the OpenCart 2.1.0.1 installation again"
you might want to say run "yoursite/install"

I have one issue where the product prices look nothing like the database on the default template

Now the hard work on all the modules/vqmods begins! :(

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 15, 2016 7:37 pm
by Randem
You are welcome.

Make sure you download and install the VQMOD I have for the real time fixes (I just changed them again).

In step 10 you run the installation the same way you started http://www.mysite.com/install, Yes?
I am not following...

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 15, 2016 9:08 pm
by dmsims
"In step 10 you run the installation the same way you started http://www.mysite.com/install, Yes?
I am not following..."

First time install http://www.mysite.com - worked

Upgrade http://www.mysite.com - gave white screen - so I ran

http://www.mysite.com/install - that worked

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 15, 2016 9:21 pm
by Randem
Oh, ok http://www.mysite.com/install is the way it is supposed to work. The fact that there was nothing in the configuration the index.php file told it to go to install. the second time there was a configuration there and it would attempt to open the store...

It Would never have occurred to me to try it without the install portion on the URL...

I made a note on the steps anyway t clarify.

Thanks

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Thu Jan 28, 2016 10:49 am
by kirkhall
Randem I don't know if you want us to comment here or register at your place and add to your instructions but...

I just completed a test, but possible actual upgrade of our OC 1.5.6.4 store to OC 2.1.0.2 using the instructions at your link Randem.

It went pretty well with only a few minor issues that confused me.

I was lazy and have so many that I did not disable all mods in our current store before starting. I don't see any side effects from not doing so...YET.

In your step 9 you say to copy the opencart.sql from the upload/install/model folder to the catalog folder. In the 2.1.2.2 download that file is located in the upload/install directory after unzipping. Not in upload/install/model No big deal, once I found it I uploaded it to my new catalog folder.

After the upgrade was complete ( step 11) I attempted to import the import the oc_settings, oc_extension, oc_layout, oc_layout_route & oc_layout_module sql files from converted database to the new upgraded database and I could not do so until I first deleted the ones that were already there from importing the original database. I guess most would know to do that but I didn't so I guessed based on the error I received when I first tried.

I also had trouble getting into admin as I was not sure which user to use but that was just me being dumb and not thinking it through. Of course it would be the user and password from the original store but there was still an issue. I noticed that in the now upgraded database the usernames were all truncated / cut off at 20 characters. Since my 1.5.6.4 install allowed for more my username which was an email address was cutoff. Once I figured that out I was able to get in. I can't remember if my 1.5.6.4 install allowing more characters was something I changed at some point of if it was that way by default.

The only thing I will need to figure out how to do after a week or so (probably more like a month) of getting everything the way I want it is how to export from the old store and import into new store orders etc that come in between now and then. But I know a guy, he commented above, who can maybe help me out.

Anyway, just wanted to say thanks. Nice job. Even someone with limited abilities can do it following your instructions...and guessing when needed.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Thu Jan 28, 2016 11:18 am
by Randem
Thank you kirkhall,

Yes, you were supposed to comment here. This is why the thread is locked on my site.

I made a few changes in the instructions to make it even more clear.

Step 9 - My bad, the opencart.sql file is originally in the install folder.

Step 11 - The reason this did not work for you was because you were supposed to use the tables from step 6 that you exported from the database of the new installation. The database that was just created (v2.1.0.1)... This is why you had trouble getting into the admin panel.

Step 6 - If you exported the SQL file with CREATE / DROP / INSERT checked you would not have had to delete the tables. They would have been automatically dropped, recreated and your data inserted.

Disabling MODS is a safety instruction... better safe than sorry. Trying to eliminate more problems than are caused.

All good though, you just made the instructions better.

Re: Data Migration from v1.5.6.4 to v2.1.0.1

Posted: Fri Jan 29, 2016 12:45 am
by jennyol
Randem, Thank you very much for your upgrade instructions.
Unfortunately I had already tried to upgrade OC in-situ (my bad) and therefore I could not save my full database instructions including the TABLE CREATE, etc.

I have a backup db. Would it work (at stage 8.) to run the opencart.sql for my old version OC 1.5.1.3 followed by the backup DB in phpmysql in order to re-create the TABLES and populate them?

Thank you