Do not recreate table schema if table did not change

When the table schema was not modified in the Edit Table dialog, do not
do anything when clicking the OK button.

See issue #1686.
This commit is contained in:
Martin Kleusberg
2018-12-25 18:51:36 +01:00
parent 094a6a624a
commit c8ef76241d

View File

@@ -1425,6 +1425,10 @@ bool DBBrowserDB::alterTable(const sqlb::ObjectIdentifier& tablename, const sqlb
}
}
// Check if any changes were made to the table schema
if(old_table == new_table)
return true;
// Create savepoint to be able to go back to it in case of any error
QString savepointName = generateSavepointName("renamecolumn");
if(!setSavepoint(savepointName))