osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Converting DB from OSC2.2 to OSCMAX2.2

This is a discussion on Converting DB from OSC2.2 to OSCMAX2.2 within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; The workaround is this: For any auto_increment field, remove the default value completely. It cannot be set for auto increment ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #11  
Old 01-23-2008, 08:52 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,986
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

The workaround is this:

For any auto_increment field, remove the default value completely. It cannot be set for auto increment fields. Do that for all of the auto_increment fields and it will work. I just had to upgrade a db and had this exact error.

I simply did as I suggest and removed the default value from the query. For example:

Code:
 CREATE TABLE article_reviews( reviews_id int( 11 ) NOT NULL DEFAULT 0 COMMENT '' AUTO_INCREMENT
becomes:

Code:
 CREATE TABLE article_reviews( reviews_id int( 11 )  NOT NULL COMMENT '' AUTO_INCREMENT
Note that you will have to go through the entire sql query and remove all instances of this through the entire query for auto_increment fields
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #12  
Old 02-04-2008, 01:29 PM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

I'm still having trouble with this... it seems i can import the products and the categories but the 2 of them don't link up... the categories look empty but the products are showing in the what's new section.

Last edited by michael_s; 02-04-2008 at 01:48 PM. Reason: Rules violation - no commercial requests in free forums. Only allowed in the marketplace.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old 02-04-2008, 01:48 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,986
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

You are forgetting to import the 'products_to_categories' table. That is what maps the products to the correct categories.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14  
Old 02-04-2008, 01:53 PM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

aah ok I'll give that a go.

I was hoping to be able to copy it across in its entirety but it keeps throwing errors at me when I do that... doing a few tables at a time seems to work quite well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15  
Old 02-17-2008, 05:27 PM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

1054 - Unknown column 'cd.categories_heading_title' in 'field list'

select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from categories c, categories_description cd where c.categories_id = '23' and cd.categories_id = '23' and cd.language_id = '1'

[TEP STOP]

What does that mean?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16  
Old 02-17-2008, 08:05 PM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

--
-- Database: `xxxxxx`
--
--
-- Dumping data for table `products`
--
INSERT INTO `products`
VALUES ( 63, 20, '51626A', '26.JPG', 44.5455, '2007-04-05 10:30:48', '2008-01-11 09:54:24', NULL , 0.08, 1, 1, 9, 0 ) ;

MySQL said:
#1136 - Column count doesn't match value count at row 1


I would like to shoot myself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17  
Old 02-18-2008, 12:21 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,986
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

The above errors mean you are not really understanding what it is that you need to do to move old osC 2.2 data to osCMax.

You can't just import the data directly from an osC 2.2 database to osCMax. You need to convert the table structure of the old osC 2.2 database to match the osCMax structure first. Use mysqldiff to create the batch file to update the structure of the old osC 2.2 database (don't change the orginal db, only work on a copy to keep your original safe in case you mess up).

Once you have updated the structure of the old osC 2.2 datbase to match the osCMax database, then you can export the data to the osCMax database and you should not get the above errors anymore.

You need to do a bit more reading about mysql and how to manipulate tables, etc. There are a lot of tutorials out there floating around on google...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18  
Old 02-18-2008, 01:04 AM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

I thought i had already done the conversion using mysqldiff... I may have f-ed something up along the way... guess I'll go back to the beginning and try again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19  
Old 02-18-2008, 01:10 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,986
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

You have to drop any columns on your osC2.2 db that are not in osCMax, otherwise the data will not match the structure, and errors will keep stopping the import.

Note, just running mysqldiff does not actually convert the database. All it does is create the sql batch for you, then you have to manually run that batch file on the database using phpmyadmin or the mysql command line.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20  
Old 02-18-2008, 02:37 AM
Member
 
Join Date: Aug 2007
Posts: 68
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 2
tcshadow is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

I've finally managed to get an error free batch file and made the modification to the osc2.2 database... I was still having issues with the import from there but I'll get it soon I'm pretty sure.

I think what's causing an issue for me at this stage is that my oscmax db had some extra non vanilla columns or tables
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
merge osc2 to oscmax2? chrismole osCMax v2 Installation issues 8 07-09-2006 02:20 PM
osC conversion: osC2.1 --> osCMax2 chrismole osCMax v2 Customization/Mods 0 03-01-2006 01:06 PM
need help converting a template jcomputers osCMax v2 Customization/Mods 3 01-23-2006 09:04 PM
Converting CRE Template to OscMax cabana osCMax v2 Customization/Mods 8 11-09-2005 07:08 PM
Converting Affiliate Infobox to BTS Stu osCMax v1.7 Discussion 4 11-25-2003 07:15 AM


All times are GMT -8. The time now is 12:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax