(mysql) Problems with database migration when switching from digikam 4. * to 5. *

I have! the ten-year cost of tagged photos managed with digikam, and my stable / test debian suite has recently been updated to digikam 5. *.

Now I am faced with the problem that the database (mysql) in which the labor of love works seems to create problems when trying to switch to a new database schema (v.8).

When starting digikam v5. * is indicated on the backend of database 4 .. * -, I get the following:

digikam.dbengine: Loading SQL code from config file "/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
 ""
Error messages: "QMYSQL: Unable to execute query" "Can't DROP 'Albums_AlbumRoots'; check that column/key exists" 1091 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n                                        DROP FOREIGN KEY Albums_AlbumRoots;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

When I explicitly try to use the db migration tool included in 5. * As a result, I get the error shown in the following image: enter image description here

Can someone help with decrypting what is happening here, respectively, how to fix it?

Joh

+4
2

- db. ( , ) . , , , db.

( , ):

https://bugs.kde.org/show_bug.cgi?id=355831#c73

select * from Images where album not in (select Albums.id from Albums);
select id, icon from Albums where icon != 0 and icon not in (select id from Images);
select * from Albums where Albums.albumRoot not in (select AlbumRoots.id from AlbumRoots);
select * from ImageHaarMatrix where imageid not in (select id from Images);
select * from ImageInformation where imageid not in (select id from Images);
select * from ImageMetadata where imageid not in (select id from Images);
select * from VideoMetadata where imageid not in (select id from Images);
select * from ImagePositions where imageid not in (select id from Images);
select * from ImageComments where imageid not in (select id from Images);
select * from ImageCopyright where imageid not in (select id from Images);
select * from Tags where pid != 0 and pid not in (select id from Tags);
select id, icon from Tags where icon != 0 and icon not in (select id from Images);
select * from ImageTags where tagid not in (select id from Tags);
select * from ImageTags where imageid not in (select id from Images);
select * from ImageProperties where imageid not in (select id from Images);
select * from ImageHistory where imageid not in (select id from Images);
select * from ImageRelations where subject not in (select id from Images);
select * from ImageRelations where object not in (select id from Images);
select * from ImageTagProperties where imageid not in (select id from Images);
select * from TagProperties where tagid not in (select id from Tags);
select * from ImageTagProperties where tagid not in (select id from Tags);

script, .

, 5.2.0 !

+4

( Debian Wheezy Debian Stretch, , -...)

:

  • , digiKam

  • ~/.kde/share/config/digikamrc ~/.config/digikamrc

  • digikam4.db sqlite (, sqlitebrowser)

  • AlbumRoots (.. %2F /)

    UPDATE AlbumRoots
    SET identifier = replace(identifier, '%2F', '/')
    WHERE identifier LIKE '%%%2F%';
    
  • (, )

  • digiKam

!

+2

Source: https://habr.com/ru/post/1655704/


All Articles