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:
Martin Kleusberg
2013-06-02 17:16:35 +02:00
parent 13c3963651
commit 928a957e70

View File

@@ -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)