This commit is contained in:
parent
4676d8f4bb
commit
b47381df1c
1 changed files with 4 additions and 2 deletions
|
@ -678,13 +678,15 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
|||
$keyword = ($v == 'onUpdate') ? ' ON UPDATE ' : ' ON DELETE ';
|
||||
|
||||
if (isset($definition[$v])) {
|
||||
switch ($definition[$v]) {
|
||||
$upper = strtoupper($definition[$v]);
|
||||
|
||||
switch ($upper) {
|
||||
case 'CASCADE':
|
||||
case 'SET NULL':
|
||||
case 'NO ACTION':
|
||||
case 'RESTRICT':
|
||||
case 'SET DEFAULT':
|
||||
$sql .= $keyword . $definition[$v];
|
||||
$sql .= $keyword . $upper;
|
||||
break;
|
||||
default:
|
||||
throw new Doctrine_Export_Exception('Unknown foreign key referential action option given.');
|
||||
|
|
Loading…
Add table
Reference in a new issue