mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
SqliteTypes: Allow non-numeric default values
Fix the sqlb::Field class to support non-numeric default values by putting them in quotes.
This commit is contained in:
@@ -15,7 +15,7 @@ QString Field::toString(const QString& indent, const QString& sep) const
|
||||
if(m_notnull)
|
||||
str += " NOT NULL";
|
||||
if(!m_defaultvalue.isEmpty())
|
||||
str += " DEFAULT " + m_defaultvalue;
|
||||
str += QString(" DEFAULT '%1'").arg(m_defaultvalue);
|
||||
if(!m_check.isEmpty())
|
||||
str += " CHECK(" + m_check + ")";
|
||||
if(m_autoincrement)
|
||||
|
||||
Reference in New Issue
Block a user