<div dir="ltr"><div><span style="font-family:monospace">Hello Gents,</span></div><div><br></div><span style="font-family:monospace"><div>I've looked in the bug reports and also in the mail-list but couldn't solve this issue:</div><div><br></div><div>I try to migrate my existing sqlite database into mysql and as soon as it starts copying over the imageinformation this error happens:</div><div><span style="font-family:monospace"><br></span></div>digikam.dbengine: Failure executing query:
<br> "INSERT INTO ImageInformation (imageid, rating, creationDate, digitizationDate, orientation, width, height, format, colorDepth, colorModel) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" <br>Error messages: "QMYSQL3: Der Befehl konnte nicht ausgeführt werden" "Cannot add or update a child row: a foreign key constraint fails (`digikam`.`ImageInformation`, CONSTRAINT `ImageInformation_Images` FOREIGN KEY (`imageid`) REFERENCES `Images` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)" 1452 2 <br>Bound values: (QVariant(qlonglong, 0), QVariant(qlonglong, 0), QVariant(QString, "2013-07-21T11:49:57"), QVariant(QString, "2013-07-21T11:49:57"), QVariant(qlonglong, 1), QVariant(qlonglong, 3024), QVariant(qlonglong, 2016), QVariant(QString, "JPG"), QVariant(qlonglong, 8), QVariant(qlonglong, 5))
<br>digikam.dbengine: Error while executing DBAction [ "Migrate_Write_ImageInformation" ] Statement [ "INSERT INTO ImageInformation (imageid, rating, creationDate, digitizationDate, orientation, width, height, format, colorDepth, colorModel) VALUES (:imageid, :rating, :creationDate, :digitizationDate, :orientation, :width, :height, :format, :colorDepth, :colorModel);" ]
<br>digikam.coredb: Core database: error while converting table data. Details: QSqlError("1452", "QMYSQL3: Der Befehl konnte nicht ausgeführt werden", "Cannot add or update a child row: a foreign key constraint fails(`digikam`.`ImageInformation`, CONSTRAINT `ImageInformation_Images` FOREIGN KEY (`imageid`) REFERENCES `Images` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)")<br>
<br></span><div>Tried it a few times, always the same error.</div><div><br></div><div>Let me know if you need more information or if I shall open a bug report.</div><div><br></div><div>Cheers</div><div>Christoph</div></div>