File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,28 @@ public function testShowCreateTable1() {
290
290
);
291
291
}
292
292
293
+ public function testShowCreateTableWithEmptyDatetimeDefault () {
294
+ $ this ->assertQuery (
295
+ "CREATE TABLE _tmp_table (
296
+ ID BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL,
297
+ created_at datetime NOT NULL
298
+ ); "
299
+ );
300
+
301
+ $ this ->assertQuery (
302
+ 'SHOW CREATE TABLE _tmp_table; '
303
+ );
304
+ $ results = $ this ->engine ->get_query_results ();
305
+
306
+ $ this ->assertEquals (
307
+ "CREATE TABLE _tmp_table (
308
+ `ID` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
309
+ `created_at` datetime NOT NULL
310
+ ); " ,
311
+ $ results [0 ]->{'Create Table ' }
312
+ );
313
+ }
314
+
293
315
public function testShowCreateTableQuoted () {
294
316
$ this ->assertQuery (
295
317
"CREATE TABLE _tmp_table (
You can’t perform that action at this time.
0 commit comments