2016-09-24 15 views
4

私は持っています! digikamで管理された10年分のタグ付き写真と私のdebian stable/testing mixは最近digikam 5にアップグレードされました。(mysql)digikamから移行する際のデータベース移行の難易度4. * to 5. *

私は今、新しいデータベースベースのスキーム(v.8)にアップグレードしようとすると、愛の労力を抱える(mysql)データベースが問題を引き起こしているように見えます。

digiKamのv5のを開始* 4で指摘* - 使用するデータベースのバックエンド私は、次を得る:。。私はで終わる*

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 

明示的にDBの移行ツールを使用しようと5に含ま

ここで起こっていることを解消するのに役立つ人はいますか?それを修正するにはどうすればよいですか?

hn

答えて

4

私の古いデータベースのいくつかの不一致のために同じ問題がありました。それらを修正した後(主に死んだ参照を削除する)、アップグレードが完了しました。私はまだ別の問題を抱えているように見えますが、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); 

から取られたソースで発見される修復スクリプトもあります。

私は、5.20が2日前にリリースされたことを知りました。 (DebianのWheezyにからのDebianストレッチへの移行に苦労し、これは誰かに役立ちます願っています...)

+0

ありがとうございます。私の場合、あなたの質問は次のようになります: 'select * from ImageInformation where imageidにはありません(画像からIDを選択してください);#18 rows' ' select * from ImageMetadata imageidはありません(画像からIDを選択してください);#18 rows' 'select * from ImageComments imageidはどこにありませんか(画像からIDを選んでください);#21行' 'select *からどこのpid!= 0かつpidに入っていないのですか? (画像からIDを選択してください);#111行 'のようにImageTagsから選択してください。#1 row' ' select * from ImageTags(タグからIDを選択);#8行 ' これらの行を削除しますか? – balin

+0

"愛の労働の10年"のために、それはわずかな損失のようであるので、私はそれを削除するだけです。もちろん、あなたはあなたの現在の状態を非常に安全な場所にバックアップしていると思います... また、添付ファイルhttps://bugs.kde.org/attachment.cgi?id=99906とバグレポートのhttps://bugs.kde.org/attachment.cgi?id=99907 - アップデートアトムとマニュアルアップデートスクリプトの前にdbを修正してください。 – Jockel

+0

コメントを再読み込みして、コードによって生成されたルートタグを持つ行以外のすべての行を削除し、バグに付属のスキーマv.7からv.8へのアップグレードコードをステップアップして、問題を解決しました。どうもありがとうございました。 – balin

2

これは私の仕事は:

  • は、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の

幸運!

+0

それは、多くのおかげで助けて! – palacsint

関連する問題