This commit is contained in:
OKINAKA Kenshin 2014-12-11 13:55:41 +09:00
parent 5cff6aa746
commit 8c008ad97d
2 changed files with 1 additions and 3 deletions

View file

@ -353,7 +353,6 @@ class Mysql extends DboSource {
}
if ($fields[$column->Field]['type'] === 'timestamp' && strtoupper($column->Default) === 'CURRENT_TIMESTAMP') {
$fields[$column->Field]['default'] = null;
$fields[$column->Field]['null'] = true;
}
if (!empty($column->Key) && isset($this->index[$column->Key])) {
$fields[$column->Field]['key'] = $this->index[$column->Key];

View file

@ -909,14 +909,13 @@ SQL;
$this->Dbo->execute('DROP TABLE ' . $name);
$this->assertNull($result['limit_date']['default']);
$this->assertTrue($result['limit_date']['null']);
$schema = new CakeSchema(array(
'connection' => 'test',
'testdescribes' => $result
));
$result = $this->Dbo->createSchema($schema);
$this->assertContains('`limit_date` timestamp NULL,', $result);
$this->assertContains('`limit_date` timestamp NOT NULL,', $result);
}
/**