Bug 316690 - MIGRATION : Database conversion by default successfully erases all data
Summary: MIGRATION : Database conversion by default successfully erases all data
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Migration (show other bugs)
Version: 5.0.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 21:49 UTC by mclaudt
Modified: 2017-11-26 11:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mclaudt 2013-03-13 21:49:53 UTC
By default, Database Migration window contains the same data for source and target database.

After clicking Migrate button, we get clean and pristinely empty database. At the end of erasing the data, we get "Database copied successfully".

I find this feature useful in some cases, but it should better me called EraseAllMySillyTags instead of Migrate, because Migrate suggests slightly different behavior ;)

Reproducible: Always

Steps to Reproduce:
1. Open Database Migration window.
2. Check that source and destination database are the same database.
3. Click Migrate button.
Actual Results:  
We get clean and pristinely empty database.

Expected Results:  
Information box, saying that source and destination database are the same, so operation has no sense.

It's all about MySQL database connection.
Comment 1 caulier.gilles 2016-07-06 20:26:31 UTC
This file still valid using last digiKam 5.0.0 ?

Gilles Caulier
Comment 2 Stefano 2016-08-24 14:14:00 UTC
Yes, because the default is both SQLite as source and destination, and if you unluckily press the confirm button, it tries to migrate it... without checking that both source and destination point to the same file, ending in a voiding of the database.
Comment 3 Stefano 2016-08-24 14:14:38 UTC
It should check that the destination file does not exist, at least.
Comment 4 Maik Qualmann 2017-11-26 11:53:56 UTC
Git commit 4b8fde33dfd15ba2a45d92c111166e6d50c946b3 by Maik Qualmann.
Committed on 26/11/2017 at 11:52.
Pushed by mqualmann into branch 'master'.

show error message if the databases are the same at the migration
FIXED-IN: 5.8.0

M  +2    -1    NEWS
M  +7    -0    libs/database/utils/dbmigrationdlg.cpp

https://commits.kde.org/digikam/4b8fde33dfd15ba2a45d92c111166e6d50c946b3