Browse Source

Add additional test for Sqlite/Postgres datetimes

Mark Story 9 years ago
parent
commit
5cd5edc41d

+ 5 - 0
tests/TestCase/Database/Schema/PostgresSchemaTest.php

@@ -760,6 +760,11 @@ SQL;
                 ['type' => 'datetime'],
                 '"created" TIMESTAMP'
             ],
+            [
+                'open_date',
+                ['type' => 'datetime', 'null' => false, 'default' => '2016-12-07 23:04:00'],
+                '"open_date" TIMESTAMP NOT NULL DEFAULT \'2016-12-07 23:04:00\''
+            ],
             // Date & Time
             [
                 'start_date',

+ 5 - 0
tests/TestCase/Database/Schema/SqliteSchemaTest.php

@@ -566,6 +566,11 @@ SQL;
                 ['type' => 'datetime'],
                 '"created" DATETIME'
             ],
+            [
+                'open_date',
+                ['type' => 'datetime', 'null' => false, 'default' => '2016-12-07 23:04:00'],
+                '"open_date" DATETIME NOT NULL DEFAULT "2016-12-07 23:04:00"'
+            ],
             // Date & Time
             [
                 'start_date',