Bug 316690

Summary: MIGRATION : Database conversion by default successfully erases all data
Product: [Applications] digikam Reporter: mclaudt <mclaudt>
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, rs4000, swatilodha27
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.8.0
Sentry Crash Report:

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