Commit 208f9956 authored by Richard Fullmer's avatar Richard Fullmer

Added support for the PostgresSqlSchemaManager to correctly parse "SET NULL",...

Added support for the PostgresSqlSchemaManager to correctly parse "SET NULL", "NO ACTION", and "SET DEFAULT" foreign key update and delete definitions.
parent c330d97c
......@@ -38,10 +38,10 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$onUpdate = 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];
}
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];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment