Bug 420978 - Error on new install Failed to update the database schema from version 9 to version 10
Summary: Error on new install Failed to update the database schema from version 9 to v...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Schema (other bugs)
Version First Reported In: 6.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-04 03:12 UTC by tami mize
Modified: 2020-05-04 19:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:


Attachments
attachment-12583-0.html (1.36 KB, text/html)
2020-05-04 04:58 UTC, tami mize
Details
dbconfig.zip (15.71 KB, application/zip)
2020-05-04 17:34 UTC, Maik Qualmann
Details
debug file when trying to open DigiKam (windows 10) (4.04 KB, text/plain)
2020-05-04 19:34 UTC, tami mize
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tami mize 2020-05-04 03:12:00 UTC
SUMMARY


STEPS TO REPRODUCE
1. Removed previous version
2. downloaded 6.4.0
3. Install appears to run normal and finish.

OBSERVED RESULT
 When opening Digikam get error and program doesn't open

EXPECTED RESULT
Digikam should open!

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2020-05-04 04:30:06 UTC
Start digiKam in the console and post the messages that are output.

Maik
Comment 2 tami mize 2020-05-04 04:58:47 UTC
Created attachment 128124 [details]
attachment-12583-0.html

I dont understand what "start in the console" means. When I try to run the program, it gives me the error and will not open the Digikam program at all. 

tami
On 5/4/2020 12:30:07 AM, Maik Qualmann <bugzilla_noreply@kde.org> wrote:
https://bugs.kde.org/show_bug.cgi?id=420978

Maik Qualmann changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |metzpinguin@gmail.com

--- Comment #1 from Maik Qualmann ---
Start digiKam in the console and post the messages that are output.

Maik

--
You are receiving this mail because:
You reported the bug.
Comment 3 caulier.gilles 2020-05-04 05:26:12 UTC
Open a Linux terminal ( a text console) and start digiKam from the command line interface:

https://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/
Comment 4 Maik Qualmann 2020-05-04 05:40:41 UTC
If I read through your description with "Install" and ends normally, I assume you are on Windows and not on Linux.
On Windows, download and start DebugView from Microsoft. Start digiKam and post the messages from DebugView.

Maik
Comment 5 Dave Irwin 2020-05-04 17:12:04 UTC
Not sure if I'm allowed to append to this issue but I have exactly the same symptoms since since loading v 6.4 today to Windows 10.  So, on the assumption that the fault is the same I've started the program under Debugview.

There is no crash log in the location mentioned.

Please advise if you want me to open a seperate issue.

Error log appended here:

[9564] digikam.general: Loading DrMinGw run-time...
[9564] digikam.general: DrMinGw run-time loaded.
[9564] digikam.general: DrMinGw crash-file will be located at:  "C:\\Users\\davej\\AppData\\Local\\digikam_crash.log"
[9564] digikam.widgets: Breeze icons resource file found
[9564] digikam.widgets: Breeze-dark icons resource file found
[9564] digikam.general: Switch to widget style:  "Windows"
[9564] digikam.general: AlbumWatch is disabled
[9564] digikam.general: Database Parameters:
[9564]    Type:                     "QSQLITE"
[9564]    DB Core Name:             "C:/Users/davej/Pictures/digikam4.db"
[9564]    DB Thumbs Name:           "C:/Users/davej/Pictures/thumbnails-digikam.db"
[9564]    DB Face Name:             "C:/Users/davej/Pictures/recognition.db"
[9564]    DB Similarity Name:       "C:/Users/davej/Pictures/similarity.db"
[9564]    Connect Options:          ""
[9564]    Host Name:                ""
[9564]    Host port:                -1
[9564]    Internal Server:          false
[9564]    Internal Server Path:     ""
[9564]    Internal Server Serv Cmd: ""
[9564]    Internal Server Init Cmd: ""
[9564]    Username:                 ""
[9564]    Password:                 ""
[9564] 
[9564] digikam.dbengine: Loading SQL code from config file "C:/Program Files/digiKam/data/digikam/database/dbconfig.xml"
[9564] digikam.dbengine: Checking XML version ID => expected:  3  found:  3
[9564] digikam.coredb: Core database: running schema update
[9564] digikam.coredb: Core database: have a structure version  9
[9564] digikam.coredb: Core database: makeUpdates  9  to  10
[9564] digikam.dbengine: Failure executing query:
[9564]  "" 
[9564] Error messages: "Unable to execute statement" "duplicate column name: manualOrder" "1" 2 
[9564] Bound values:  ()
[9564] digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV9ToV10" ] Statement [ "ALTER TABLE Images ADD manualOrder INTEGER;" ]
[9564] digikam.coredb: Core database: schema update to V 10 failed!
[9564] digikam.coredb: Core database: cannot process schema initialization
[9564] KMemoryInfo: Platform identified :  "WINDOWS"
[9564] KMemoryInfo: TotalRam:  8534626304
[9564] digikam.general: Allowing a cache size of 200 MB
[9564] QThreadStorage: Thread 0x26ba7d1bfb0 exited after QThreadStorage 7 destroyed
[9564] QWaitCondition: Destroyed while threads are still waiting
[30864] 19360 0000000000000000 ENTER: DllCanUnloadNow
[30864] 35576 0000000000000000 ENTER: DllCanUnloadNow
[30864] 4028 0000000000000000 ENTER: DllCanUnloadNow
[30864] 29340 0000000000000000 ENTER: DllCanUnloadNow
[30864] 26384 0000000000000000 ENTER: DllCanUnloadNow
[30864] 35576 0000000000000000 ENTER: DllCanUnloadNow
Comment 6 Maik Qualmann 2020-05-04 17:34:20 UTC
Created attachment 128142 [details]
dbconfig.zip

The reason is clear, you started with a beta version with digiKam and the database. Now the update fails. Unzip the attached file and replace the existing dbconfig.xml with this file:
In Windows mostly here:

C:\Program Files\digiKam\data\digikam\database

On Linux mostly here:

/usr/share/digikam/database/

Maik
Comment 7 Dave Irwin 2020-05-04 18:01:02 UTC
Perfect solution Maik, now works perfectly.  Hope this fixes Tami's issue as well.

Many thanks for the speedy response.
Dave
Comment 8 tami mize 2020-05-04 19:34:54 UTC
Created attachment 128150 [details]
debug file when trying to open DigiKam (windows 10)

thanks for your help.
Comment 9 Maik Qualmann 2020-05-04 19:45:09 UTC
Look at Comment 6, it's the same cause. Database was created with a beta version. Replace the dbconfig.xml and everything will be fine. There will be no problem in the future if you install new versions of digiKam. I now close the bug.

Maik