osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Migrating data over from osc MS2 getting ERRORS HELP!!

This is a discussion on Migrating data over from osc MS2 getting ERRORS HELP!! within the osCMax v1.7 Installation forums, part of the osCMax v1.7 Forums category; Ok a bit of history. I am migrating data from my old website witch is OS commerse mile stone 2 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Installation

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 04-07-2004, 08:00 AM
FilmDirector's Avatar
New Member
 
Join Date: Apr 2004
Location: Fort Collins Colorado
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
FilmDirector
Default Migrating data over from osc MS2 getting ERRORS HELP!!

Ok a bit of history. I am migrating data from my old website witch is OS commerse mile stone 2 to the new OSC MAX 1.5. I used the diff program on my old database and the osc MAX 1.5 database. then I did an export data only on my old database after I ran the diff.sql file on the old database. Then I went through the data only dump and took out every thing except my customer data and product data. So my trouble is this. I am importing my new data to the osc max database and have exacuted a delete from on the new database so I can import my new data. When I run the sql file I get the following error.

Error
SQL-query :
INSERT INTO address_book
VALUES ( 1, 2, 'm', '', 'Shane', 'Miller', '1108 maple street upper', NULL , '80521', 'Fort Collins', '', 223, 13 )
MySQL said:
Duplicate entry '1' for key 1

So what is up with OSCMAX? does the address_book_id have to be uniqe for every customer in the address book now?? Sobody please HELP!!!!

Shane Miller
Unix System Administrator...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-07-2004, 08:47 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,562
Thanks: 1
Thanked 84 Times in 71 Posts
Rep Power: 10
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
Default

Short answer - Always had to be unique. Every table in MySQL HAS to have at least one feild that has to have a UNIQUE identifier. This is a requirment for ANY database.

MySQLDiff only UPGRADES the DB format. Data is a bit more complicated. Address book (I think) should be cleared before importing.
__________________
JPF - osCMax Fourm Moderator
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 04-07-2004, 11:31 AM
FilmDirector's Avatar
New Member
 
Join Date: Apr 2004
Location: Fort Collins Colorado
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
FilmDirector
Default Errors!!

Yes I cleared all the databases that I re-loaded with data. I guess my Question is why did this work in the first database OSC MS2 and not in OSC MAX 1.5?? What do I have to do to get the address book id to work?? If I give everyone a uniqe number will that screw up the orders and the orders product database?? or is this not fixable??



Shane Miller
Unix System Admin.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 04-07-2004, 02:47 PM
Active Member
 
Join Date: Jan 2003
Location: Surrey, UK
Posts: 126
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jonthewebb
Default

I have just been upgrading to an MS-MAX and had to import all the data too. I did it by fisrt ensuring that all the new extra fields in MS2-MAX were presentin the old database, by adding them manually in phpMyAdmin. I then exported the relevant tables one at a time (address_book, countries, customers, orders, orders_products, orders_products_attributes, orders_status_history, orders_total, customers_info in this case) using the "add drop table" feature in phpMyAdmin. Then when you import the old tables it first deletes the old one before recreating it with the data.

Doing that will certainly cure your problem.


jon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 04-07-2004, 02:49 PM
Anonymous
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by jonthewebb
I have just been upgrading to an MS-MAX and had to import all the data too. I did it by fisrt ensuring that all the new extra fields in MS2-MAX were presentin the old database, by adding them manually in phpMyAdmin. I then exported the relevant tables one at a time (address_book, countries, customers, orders, orders_products, orders_products_attributes, orders_status_history, orders_total, customers_info in this case) using the "add drop table" feature in phpMyAdmin. Then when you import the old tables it first deletes the old one before recreating it with the data.

Doing that will certainly cure your problem.


jon
Ok I will give it a try and let you know how it go's Thank you for the sugestion. I did a dump data only but did not include the drop table option first I guess.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 04-07-2004, 02:51 PM
FilmDirector's Avatar
New Member
 
Join Date: Apr 2004
Location: Fort Collins Colorado
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
FilmDirector
Default

Quote:
Originally Posted by Anonymous
Quote:
Originally Posted by jonthewebb
I have just been upgrading to an MS-MAX and had to import all the data too. I did it by fisrt ensuring that all the new extra fields in MS2-MAX were presentin the old database, by adding them manually in phpMyAdmin. I then exported the relevant tables one at a time (address_book, countries, customers, orders, orders_products, orders_products_attributes, orders_status_history, orders_total, customers_info in this case) using the "add drop table" feature in phpMyAdmin. Then when you import the old tables it first deletes the old one before recreating it with the data.

Doing that will certainly cure your problem.


jon
Ok I will give it a try and let you know how it go's Thank you for the sugestion. I did a dump data only but did not include the drop table option first I guess.
OOPS I forgot to login first.

Ok I will give it a try and let you know how it go's Thank you for the sugestion. I did a dump data only but did not include the drop table option first I guess.

Shane Miller
Unix System Admin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 04-28-2004, 01:45 PM
Anonymous
Guest
 
Posts: n/a
Default

INSERT INTO address_book
VALUES ( 1, 2, 'm', '', 'Shane', 'Miller', '1108 maple street upper', NULL , '80521', 'Fort Collins', '', 223, 13 )

erase the 1st value, or set it to null. The number is autoincromented by MySQL and it will complain if it doen't get to determine the next value...

INSERT INTO address_book VALUES ( , 2, 'm', ''
or
INSERT INTO address_book VALUES ( NULL, 2, 'm', ''
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 05-10-2004, 12:06 PM
Anonymous
Guest
 
Posts: n/a
Default

Ok I have gotten the same errors. I think I understand what the problem is based on what has been said, but my head is pounding from starring at my screen for 4 days straight.

If I understand correctly what you are saying is that mysqldiff changes the table structure but the data itself still needs to be changed before it can be dumped into the new structure?

If thats the case is there a global mysql command that can be used to change a column within the the table? Or is a manual scrub the only fix?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

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
Migrating customers to new store adam71o osCMax v1.7 Discussion 9 01-22-2006 05:49 PM
How do I import data from previous version data base? rondgray osCMax v1.7 Discussion 1 12-19-2004 12:24 AM
Help migrating to OSC Max jptechnical osCMax v1.7 Installation 2 06-14-2004 12:56 PM
data question annea03 osCMax v1.7 Discussion 3 10-10-2003 10:14 PM
Migrating from MS2 to MS2-MAX nrvtoday osCMax v1.7 Discussion 2 10-04-2003 05:04 AM


All times are GMT -8. The time now is 10:42 PM.


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