We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2661f9 commit e43782eCopy full SHA for e43782e
1 file changed
tests/WP_SQLite_Translator_Tests.php
@@ -290,6 +290,28 @@ public function testShowCreateTable1() {
290
);
291
}
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
302
+ 'SHOW CREATE TABLE _tmp_table;'
303
304
+ $results = $this->engine->get_query_results();
305
306
+ $this->assertEquals(
307
308
+ `ID` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
309
+ `created_at` datetime NOT NULL
310
+);",
311
+ $results[0]->{'Create Table'}
312
313
+ }
314
315
public function testShowCreateTableQuoted() {
316
$this->assertQuery(
317
"CREATE TABLE _tmp_table (
0 commit comments