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; Hello, I am sorry to post this yet again but the thread I found about converting a DM using MySQLdiff ...


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
  #1  
Old 08-23-2007, 05:23 AM
New Member
 
Join Date: Mar 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Twizted is on a distinguished road
Default Converting DB from OSC2.2 to OSCMAX2.2

Hello, I am sorry to post this yet again but the thread I found about converting a DM using MySQLdiff was closed and little to no good info can actually be found on this.

I am attempting to convert my production store which is a modified version of OSC2.2 to OSCMAX

I have made two new databases to do this and imported the old (OSC2.2) db and in the other imported the new OSCMAX (stock) db.

I ran mysqldiff and left all the options as is.. and got the file to convert.. I copied and pasted it into an SQL query in phpMyAdmin for the OLD db... when I run it I get this error right off the bat


Code:
#
# DDL START
#
CREATE TABLE admin( admin_id int( 11 ) NOT NULL DEFAULT 0 COMMENT '' AUTO_INCREMENT ,
admin_groups_id int( 11 ) NULL DEFAULT NULL COMMENT '',
admin_firstname varchar( 32 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_lastname varchar( 32 ) NULL DEFAULT NULL COMMENT '' COLLATE latin1_swedish_ci,
admin_email_address varchar( 96 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_password varchar( 40 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_created datetime NULL DEFAULT NULL COMMENT '',
admin_modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
admin_logdate datetime NULL DEFAULT NULL COMMENT '',
admin_lognum int( 11 ) NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY ( admin_id ) ,
UNIQUE admin_email_address( admin_email_address ) 
) DEFAULT CHARSET = latin1 COLLATE = latin1_swedish_ci;
 
 
 
MySQL said:  
#1067 - Invalid default value for 'admin_id' 


I tried removing that section and it would error again on the very next section.. Could you please tell me what I am doing wrong or possibly point me to a thread explaining how to convert from a old osCommerce MS2.2 to OSCMAX2.. I have read a few and not really getting anywhere

thank you for your time...


**reposted from PM for others benifit**
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 08-23-2007, 06:23 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 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

Change the default value from zero to 1:

DEFAULT 1

Do a search and replace in the entire sql and change any zero default values to 1 or drop the default value altogther. I think it is due to the age of the mysqldiff application, it is not 100% compatible with the current mysql version as it was developed years ago and has not been updated.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • 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.

  • 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
  #3  
Old 08-23-2007, 07:23 AM
New Member
 
Join Date: Mar 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Twizted is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

Uh oh... I just tried it and no go..

Code:
Error

SQL query: 

#
# DDL START
#
CREATE TABLE admin( admin_id int( 11 ) NOT NULL DEFAULT 1 COMMENT '' AUTO_INCREMENT ,
admin_groups_id int( 11 ) NULL DEFAULT NULL COMMENT '',
admin_firstname varchar( 32 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_lastname varchar( 32 ) NULL DEFAULT NULL COMMENT '' COLLATE latin1_swedish_ci,
admin_email_address varchar( 96 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_password varchar( 40 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
admin_created datetime NULL DEFAULT NULL COMMENT '',
admin_modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
admin_logdate datetime NULL DEFAULT NULL COMMENT '',
admin_lognum int( 11 ) NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY ( admin_id ) ,
UNIQUE admin_email_address( admin_email_address ) 
) DEFAULT CHARSET = latin1 COLLATE = latin1_swedish_ci;


MySQL said:  
#1067 - Invalid default value for 'admin_id'
Appears to be the same error...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-23-2007, 07:30 AM
New Member
 
Join Date: Mar 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Twizted is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

as an experiment I tried setting the default ID to null and it worked... and got past the first three sections and on the 4th errored because I had not set it to null.. What will setting them to null do?

**EDIT**
Yep, I changed the Default ID (first line of all the CREATE TABLE calls) down to Affiliate_Sales and BAM... Right after that one..

Code:
Error

SQL query: 

CREATE TABLE article_reviews( reviews_id int( 11 ) NOT NULL DEFAULT 0 COMMENT '' AUTO_INCREMENT ,
articles_id int( 11 ) NOT NULL DEFAULT '0' COMMENT '',
customers_id int( 11 ) NULL DEFAULT NULL COMMENT '',
customers_name varchar( 64 ) NOT NULL DEFAULT '' COMMENT '' COLLATE latin1_swedish_ci,
reviews_rating int( 1 ) NULL DEFAULT NULL COMMENT '',
date_added datetime NULL DEFAULT NULL COMMENT '',
last_modified datetime NULL DEFAULT NULL COMMENT '',
reviews_read int( 5 ) NOT NULL DEFAULT '0' COMMENT '',
approved tinyint( 3 ) unsigned NULL DEFAULT '0' COMMENT '',
PRIMARY KEY ( reviews_id ) 
) DEFAULT CHARSET = latin1 COLLATE = latin1_swedish_ci;



MySQL said:  
#1067 - Invalid default value for 'reviews_id'
Now I just need to know how to get past that... I mean... Will using null hurt or what? I am a bit of a n00b in this respect.

Last edited by Twizted; 08-23-2007 at 07:35 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-23-2007, 08:08 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 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

No, default values only tell what to enter in for the field if there is no input for it. You should be fine.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • 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.

  • 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
  #6  
Old 08-23-2007, 10:16 AM
New Member
 
Join Date: Mar 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Twizted is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

OMG.. I am about to go nuts... I had set them all to NULL

DEFAULT 0 -> DEFAULT NULL
and
DEFAULT '0' -> DEFAULT 'NULL'

so then I get an error one saying it cant have a default value... :'(

OMG I wish this was easier.. I dont really know enough to edit SQL files.... Would anyone be willing to help me.. Its not a monsterous database.. the original (OSC2.2) is only 1mb.... I just do not want to loose my customers nor am I very keen on having to reload all the products again (I have started this process a few other times to no avail and in frustration usually throw my hands up and quit but this time I "need" to get this working)

Any help would be awesome.. Please...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 08-23-2007, 07:30 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 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

Just remove the default value parameter entirely and I think you will be fine. I think I ran into this a while back on an update I did and that is how I worked around it. It was a while ago so my memory is a bit foggy, but it only took a couple of minutes to work around.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • 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.

  • 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
  #8  
Old 08-24-2007, 05:38 PM
New Member
 
Join Date: Mar 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Twizted is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

I tried that as I stated it come up saying something couldnt have a default value or something.. I am not sure..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 09-29-2007, 03:12 AM
Lurker
 
Join Date: Sep 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oscjww103 is on a distinguished road
Default Re: Converting DB from OSC2.2 to OSCMAX2.2

i am having exactly the same problem as this - does anyone have a solution?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 01-23-2008, 08:48 PM
Member
 
Join Date: Aug 2007
Posts: 64
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

also having the same problem... trying to find a workaround I'll post it here if I find one
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
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 01: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 10:59 AM.


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