Skip to content
Permalink
Browse files

Fix incorrect defaults.

  • Loading branch information...
markstory committed Jun 6, 2013
1 parent 5fa500c commit 8e3ae129989c7cee47943b36b5435271a87a3123
Showing with 3 additions and 8 deletions.
  1. +3 −8 lib/Cake/Database/Schema/Table.php
@@ -92,9 +92,9 @@ class Table {
'type' => null,
'columns' => [],
'length' => [],
'references' => null,
'update' => null,
'delete' => null,
'references' => [],
'update' => 'cascade',
'delete' => 'cascade',
];
/**
@@ -328,11 +328,6 @@ public function addConstraint($name, $attrs) {
* @return array
*/
protected function _checkForeignKey($attrs) {
$attrs += [
'references' => [],
'update' => 'cascade',
'delete' => 'cascade',
];
if (count($attrs['references']) < 2) {
throw new Exception(__d('cake_dev', 'References must contain a table and column.'));
}

0 comments on commit 8e3ae12

Please sign in to comment.
You can’t perform that action at this time.