SUMMARY This is quite major, when having a problem with Akonadi backend. such as a distro upgrade, MySQL server upgrade. or a Migration trouble > org.kde.pim.akonadiserver: "\nSql error: Duplicate column name 'version' QMYSQL: Unable to execute query\nQuery: ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0" org.kde.pim.akonadiserver: Unable to initialize database. we are in a situation, where the easiest is to delete the .local/share/akonadi/db_data folder I don't want to remove the ~/.config/akonadi/ because I have many accounts and it is quite tedious to setup. I only do that every 2-3 years when I get a new computer. I had the annoyance for a while about the favorite folders. everytime they were pointing to a new location. so I was removing them and recreating them. but today I was looking for the email I had just sent.. and it was no where to find found. I go into my settings. and the folders for sent/template/drafts are pointing to totally random folder that are not even in the same IMAP account... STEPS TO REPRODUCE 0. use favorite folders, set custom sent/draft/templates folder for your IMAP account 1. close kmail/kontact 2. akonadictl stop 3. akonadictl status # check 4. mv ~/.local/share/akonadi/db_data ~/.local/share/akonadi/db_data-last 5. akonadictl start 6. open kmail, check your settings. 7. be scared about the mess OBSERVED RESULT folders are wrong EXPECTED RESULT folders should be preserved SOFTWARE/OS VERSIONS Windows: Never in 25 years macOS: Only when a gun is pointed at me Linux/KDE Plasma: Yes, of course, , Kubuntu 19.10, packages (available in About System) KDE Plasma Version: 5.17.3 KDE Frameworks Version: 5.64.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION no pets, 1 wife, 3 kids thank you
IMHO critical
CRITICAL IMO
it(s not supported. You removed/moved database so it will create new identifier for theses folders. So for sure it will change. We can't fix it. Regards
I had no choice to redo the data from scratch, since Akonadi would no longer start, I know that's a different issue But favorite folder links could still be preserved. Instead of a random generated ID, if it was a hash of the folder path? Wouldn't that work better? Thanks for considering this.