Skip to content

Commit

Permalink
Update PostgresSchemaTest.php
Browse files Browse the repository at this point in the history
Add additional tests for Datetime format.
  • Loading branch information
ajquick committed Jan 15, 2017
1 parent 1dcca27 commit b25f95e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/TestCase/Database/Schema/PostgresSchemaTest.php
Expand Up @@ -781,7 +781,7 @@ public static function columnSqlProvider()
['type' => 'boolean', 'default' => 1, 'null' => false],
'"checked" BOOLEAN NOT NULL DEFAULT TRUE'
],
// datetimes
// Datetime
[
'created',
['type' => 'datetime'],
Expand All @@ -792,6 +792,16 @@ public static function columnSqlProvider()
['type' => 'datetime', 'null' => false, 'default' => '2016-12-07 23:04:00'],
'"open_date" TIMESTAMP NOT NULL DEFAULT \'2016-12-07 23:04:00\''
],
[
'null_date',
['type' => 'datetime', 'null' => true],
'"null_date" TIMESTAMP NULL DEFAULT NULL'
],
[
'current_timestamp',
['type' => 'datetime', 'null' => false, 'default' => 'CURRENT_TIMESTAMP'],
'"current_timestamp" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP'
],
// Date & Time
[
'start_date',
Expand All @@ -803,7 +813,7 @@ public static function columnSqlProvider()
['type' => 'time'],
'"start_time" TIME'
],
// timestamps
// Timestamp
[
'created',
['type' => 'timestamp', 'null' => true],
Expand Down

0 comments on commit b25f95e

Please sign in to comment.