Issue when migrating sqlite to mysql

Christoph Huckle chrihuc at gmail.com
Fri Aug 19 13:06:25 BST 2016


Hello Gents,

I've looked in the bug reports and also in the mail-list but couldn't solve
this issue:

I try to migrate my existing sqlite database into mysql and as soon as it
starts copying over the imageinformation this error happens:

digikam.dbengine: Failure executing query:
"INSERT INTO ImageInformation (imageid, rating, creationDate,
digitizationDate, orientation, width, height, format, colorDepth,
colorModel) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
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
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))
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);" ]
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)")

Tried it a few times, always the same error.

Let me know if you need more information or if I shall open a bug report.

Cheers
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20160819/13c55844/attachment.html>


More information about the Digikam-users mailing list