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 @@ -289,6 +289,28 @@ public function testShowCreateTable1() {
289
289
);
290
290
}
291
291
292
+ public function testShowCreateTableWithEmptyDatetimeDefault () {
293
+ $ this ->assertQuery (
294
+ "CREATE TABLE _tmp_table (
295
+ ID BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL,
296
+ created_at datetime NOT NULL
297
+ ); "
298
+ );
299
+
300
+ $ this ->assertQuery (
301
+ 'SHOW CREATE TABLE _tmp_table; '
302
+ );
303
+ $ results = $ this ->engine ->get_query_results ();
304
+
305
+ $ this ->assertEquals (
306
+ "CREATE TABLE _tmp_table (
307
+ `ID` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
308
+ `created_at` datetime NOT NULL
309
+ ); " ,
310
+ $ results [0 ]->{'Create Table ' }
311
+ );
312
+ }
313
+
292
314
public function testShowCreateTableQuoted () {
293
315
$ this ->assertQuery (
294
316
"CREATE TABLE _tmp_table (
You can’t perform that action at this time.
0 commit comments