mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
EditTableDialog: Make it possible again to delete default value
Commit c29702a1b9 fixed the handling of
default values and added a check to enforce quote characters when they
are needed. This check wasn't prepare for empty default values (i.e. no
default value) and would add quote characters in this case, too. This is
fixed by this commit.
See issue #133.
This commit is contained in:
@@ -338,7 +338,7 @@ void EditTableDialog::itemChanged(QTreeWidgetItem *item, int column)
|
||||
QString new_value = item->text(column);
|
||||
// If the default value isn't a SQL keyword perform an extra check: If it isn't numeric but doesn't start and end with quotes,
|
||||
// add the quotes
|
||||
if(new_value.compare("null", Qt::CaseInsensitive) &&
|
||||
if(new_value.size() && new_value.compare("null", Qt::CaseInsensitive) &&
|
||||
new_value.compare("current_time", Qt::CaseInsensitive) &&
|
||||
new_value.compare("current_date", Qt::CaseInsensitive) &&
|
||||
new_value.compare("current_timestamp", Qt::CaseInsensitive))
|
||||
|
||||
Reference in New Issue
Block a user