[SOLVED] Guide on how to update the encryption

MMEX4Desktop, incl. Windows, macOS, and Most Unix variants using the GTK+ toolkit

Moderator: Renato

aka13
New User
Posts: 2
Joined: Mon Jun 29, 2020 9:31 am
Are you a spam bot?: No

[SOLVED] Guide on how to update the encryption

Post by aka13 »

This post is linked via the github.
I had no idea updating would break my entire workflow and require me to dive in to sqlite.
The notice is small, and comes after THEMES breaking :D .
This forum post does not contain coherent instructions on how to change the encryption for my db.

I appreciate your tool, but I find it absolutely terrible, that a routine update completely nukes my setup, and requires me to do manual migrations on my db with third party tools with no forewarning.

To anyone suffering the same frustrations, coming here from the GH release notes, the steps repeated in a more conclusive fashion:
1. Download wxSQLite
2. Click on "open existing database", deselect *db from file selector, ignore "file is not a database" error.
3. Enter encryption key
4.Paste the two lines into the "SQL" window in the right upper corner

Code: Select all

PRAGMA cipher=SQLCipher;
PRAGMA legacy=4;
5. Press "Execute Script"
6. Press commit
7. Press Encryption key, otherwise it will not work
8. Enter your old encryption key
9. Now you can close the database. If you do not press close database, on subsequent openings the key to the db gets cached(?) and you do not need to enter it. Kinda defeats the point of having an encrypted database. Let's hope it's not also cached somewhere in "recent connections".
10. Now the database can be opened by 1.8.1 mmex.