View Issue Details

IDProjectCategoryView StatusLast Update
0002517MMW v4DB/FileMonitorpublic2007-09-02 17:12
Reporterjiri Assigned To 
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.0 
Summary0002517: Implement proper upgrade from Access to SQLite DB
DescriptionSince we’ll use SQLite DB engine starting from MM 3.0, we need to prepare a smooth transition for all old users of MM, i.e. Access database has to be converted to SQLite transparently on the first startup of MM 3.0.

Database conversion steps:
1. Check if we can find an existing SQLite database, if so, we’re done.
2. If not, try to find an old Access database (using the same algorithm we used in the previous versions – i.e. check several locations where could it be).
3. Create a new SQLite database (already implemented).
4. If we didn’t find an old Access database, this is all we have to do, we’ll start with just created empty SQLite DB.
5. If we find an old Access database, update it to the latest version MM.exe can update an Access database (version 2.5.8 – see MP3Consts.pas) and then execute a new executable DBUpgrade.exe.
6. While the conversion proceeds, show some progress dialog (maybe some text could be shown directly on Startup window?)
7. After the conversion finishes, proceed with MM start up.

How DBUpgrade.exe should work:
1. It receives command lines arguments: Source MS Access DB file and destination SQLite DB file.
2. ODBC DSN for the Access DB is created (as in MM 2.5 and older).
3. All data from Access DB is read and after some conversion written to SQLite DB.
4. This conversion step will be continually improved until MM 3.0 is released and the final SQLite DB schema is produced. Future DB updates will be done directly by MM.exe.
5. After a successful conversion, the Access database file should be renamed from MediaMonkey.mdb to MediaMonkey.mdb.pre30 (so that it isn’t imported again in the future).
6. This project should be stored in SVN under Helpers\DBUpgrade.
7. For purpose of this project I’d recommend to make two versions of DBPlus.pas in Helpers\DBUpgrade, one for reading from Access (using MODBC) and the other for storing data to SQLite (using the native interface).
8. It’s a separate executable for several reasons, mainly because it allows that the main MM.exe won’t link MODBC and any Access specific code at all.
TagsNo tags attached.
Fixed in build1067

Relationships

parent of 0002729 closedpetr Add LastModified field to MM DB 
related to 0003399 closedjiri Install MM3 to Program Files\MediaMonkey3\ -- Revert 
related to 0003489 closedpetr Prompt user whether to proceed with DB upgrade 

Activities

rusty

2007-08-16 22:15

administrator   ~0010156

Raising to immediate as this requires some new strings and string translation needs to begin asap.

Strings could be along the following lines (we already have some strings...we may want to alter them a bit to make them more clear):

Please wait while your Database is updated to the new format. The current version of your database will be backed up.
[Cancel]

Database update complete.
[OK]
 
There was a problem updating database to the new format. You may proceed by rescanning your hard drive.
[OK] [Cancel]

rusty

2007-08-17 04:23

administrator   ~0010160

I want to make one very important point:
The database upgrade should proceed in a manner that doesn't prevent MM2.x from to use the old DB. This is especially important in case of a bad DB upgrade. This is also consistent with the plan to install MM3 to \Program Files\MediaMonkey3\

petr

2007-08-31 01:29

developer   ~0010421

Done. Will be in 1067.

rusty

2007-09-02 17:12

administrator   ~0010445

Verified 1067--worked on my DB of 4k tracks correctly.