Skip to content

Commit

Permalink
Update SqlserverSchemaTest.php
Browse files Browse the repository at this point in the history
Add more Datetime tests.
  • Loading branch information
ajquick committed Jan 15, 2017
1 parent b25f95e commit 943922f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/TestCase/Database/Schema/SqlserverSchemaTest.php
Expand Up @@ -622,7 +622,7 @@ public static function columnSqlProvider()
['type' => 'boolean', 'default' => true, 'null' => false],
'[checked] BIT NOT NULL DEFAULT 1'
],
// datetimes
// Datetime
[
'created',
['type' => 'datetime'],
Expand All @@ -638,6 +638,16 @@ public static function columnSqlProvider()
['type' => 'datetime', 'null' => false, 'default' => 'current_timestamp'],
'[open_date] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP'
],
[
'null_date',
['type' => 'datetime', 'null' => true, 'default' => 'current_timestamp'],
'[null_date] DATETIME NULL DEFAULT CURRENT_TIMESTAMP'
],
[
'null_date',
['type' => 'datetime', 'null' => true],
'[null_date] DATETIME NULL DEFAULT NULL'
],
// Date & Time
[
'start_date',
Expand All @@ -649,7 +659,7 @@ public static function columnSqlProvider()
['type' => 'time'],
'[start_time] TIME'
],
// timestamps
// Timestamp
[
'created',
['type' => 'timestamp', 'null' => true],
Expand Down

0 comments on commit 943922f

Please sign in to comment.