Skip to content

Commit

Permalink
Merge pull request #18 from richardfullmer/master
Browse files Browse the repository at this point in the history
Support for Postgres SET NULL, SET DEFAULT, and NO ACTION foreign key detection in the PostgresSQLSchema Manager
  • Loading branch information
guilhermeblanco committed Jul 12, 2011
2 parents 5d4d171 + 208f995 commit 2434d95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
Expand Up @@ -38,10 +38,10 @@ protected function _getPortableTableForeignKeyDefinition($tableForeignKey)
$onUpdate = null; $onUpdate = null;
$onDelete = null; $onDelete = null;


if (preg_match('(ON UPDATE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { if (preg_match('(ON UPDATE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) {
$onUpdate = $match[1]; $onUpdate = $match[1];
} }
if (preg_match('(ON DELETE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { if (preg_match('(ON DELETE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) {
$onDelete = $match[1]; $onDelete = $match[1];
} }


Expand Down

0 comments on commit 2434d95

Please sign in to comment.