File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ void TestTable::parseSQLdefaultexpr()
109109 QString sSQL = " CREATE TABLE chtest(\n "
110110 " id integer primary key,\n "
111111 " dumpytext text default('axa') CHECK(dumpytext == \" aa\" ),\n "
112+ " date datetime default CURRENT_TIMESTAMP,"
112113 " zoi integer)" ;
113114
114115 Table tab = Table::parseSQL (sSQL );
@@ -126,6 +127,8 @@ void TestTable::parseSQLdefaultexpr()
126127 QCOMPARE (tab.fields ().at (1 )->check (), QString (" dumpytext == \" aa\" " ));
127128 QCOMPARE (tab.fields ().at (2 )->defaultValue (), QString (" " ));
128129 QCOMPARE (tab.fields ().at (2 )->check (), QString (" " ));
130+ QCOMPARE (tab.fields ().at (3 )->defaultValue (), QString (" CURRENT_TIMESTAMP" ));
131+ QCOMPARE (tab.fields ().at (3 )->check (), QString (" " ));
129132
130133 QVERIFY (tab.fields ().at (0 )->primaryKey ());
131134}
You can’t perform that action at this time.
0 commit comments