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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| 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... |
|
#2
| ||||
| ||||
| 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! |
|
#3
| ||||
| ||||
| 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. |
|
#4
| |||
| |||
| 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 |
|
#5
| |||
| |||
| Quote:
|
|
#6
| ||||
| ||||
| Quote:
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 |
|
#7
| |||
| |||
| 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', '' |
|
#8
| |||
| |||
| 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? |
| Thread Tools | |
| |
| ||||
| 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 |