scj_1to2.db_converter.php - Mysql error 1062: Duplicate entry

Post Reply
alexscj
Posts: 160
Joined: Mon Apr 01, 2013 3:04 pm

scj_1to2.db_converter.php - Mysql error 1062: Duplicate entry

Post by alexscj »

Hello,

converting a SCJ v52 database to TCMS with scj_1to2.db_converter.php but getting an error in the copying gallery data stage:
.
.
.
5300 (shift 10000)
5400 (shift 10000)
5500 (shift 10000)
5600 (shift 10000)
5700 (shift 10000)
5900 (shift 10000)

Mysql error 1062: Duplicate entry '6819' for key 'PRIMARY' (insert into rot_gallery_data1 (`alt`, `description`, `custom_var1`, `custom_var2`, `custom_var3`, `gallery_slug`, `gallery_id`) values ('My wife with Shisha', '', '', '', '', 'my-wife-with-shisha', '6819')) (316.50563693047, 136.22535085678)
PHP Fatal error: Uncaught Exception: Mysql error:: 1062 (Duplicate entry '6819' for key 'PRIMARY') (db_link) in query insert into rot_gallery_data1 (`alt`, `description`, `custom_var1`, `custom_var2`, `custom_var3`, `gallery_slug`, `gallery_id`) values ('My wife with Shisha', '', '', '', '', 'my-wife-with-shisha', '6819'). () in /server_path_removed/includes/db_modules/mysql.php:129
Stack trace:
#0 /server_path_removed/includes/db_modules/mysql.php(182): db_error('insert into rot...', 1062, 'Duplicate entry...', 'db_link')
#1 /server_path_removed/includes/db_modules/mysql.php(303): db_query('insert into rot...', 'db_link')
#2 /server_path_removed/bin/scj_1to2_db_converter.php(499): db_perform('rot_gallery_dat...', Array)
#3 {main}
thrown in /server_path_removed/includes/db_modules/mysql.php on line 129

Fatal error: Uncaught Exception: Mysql error:: 1062 (Duplicate entry '6819' for key 'PRIMARY') (db_link) in query insert into rot_gallery_data1 (`alt`, `description`, `custom_var1`, `custom_var2`, `custom_var3`, `gallery_slug`, `gallery_id`) values ('My wife with Shisha', '', '', '', '', 'my-wife-with-shisha', '6819'). () in /server_path_removed/includes/db_modules/mysql.php:129
Stack trace:
#0 /server_path_removed/includes/db_modules/mysql.php(182): db_error('insert into rot...', 1062, 'Duplicate entry...', 'db_link')
#1 /server_path_removed/includes/db_modules/mysql.php(303): db_query('insert into rot...', 'db_link')
#2 /server_path_removed/bin/scj_1to2_db_converter.php(499): db_perform('rot_gallery_dat...', Array)
#3 {main}
thrown in /server_path_removed/includes/db_modules/mysql.php on line 129
If I restart the process I get the same error but for a different entry.

I've tried repairing the original database, started everything fresh, I can't figure it out how to get pass this.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: scj_1to2.db_converter.php - Mysql error 1062: Duplicate entry

Post by admin »

Hi, disable cron jobs for awhile and stop gallery_grabbers\checkers
Don't forget to run script update
alexscj
Posts: 160
Joined: Mon Apr 01, 2013 3:04 pm

Re: scj_1to2.db_converter.php - Mysql error 1062: Duplicate entry

Post by alexscj »

Lucky guess! :D

Works, thanks!
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: scj_1to2.db_converter.php - Mysql error 1062: Duplicate entry

Post by admin »

NP)
Don't forget to run script update
Post Reply