| @@ 129-136 (lines=8) @@ | ||
| 126 | ]) |
|
| 127 | ->get(); |
|
| 128 | ||
| 129 | if($key['on_delete']){ |
|
| 130 | $constraint .= PHP_EOL . $this->getTemplate('migration/on-constraint') |
|
| 131 | ->with([ |
|
| 132 | 'event' => 'Delete', |
|
| 133 | 'action' => $key['on_delete'] |
|
| 134 | ]) |
|
| 135 | ->get(); |
|
| 136 | } |
|
| 137 | ||
| 138 | if($key['on_update']){ |
|
| 139 | $constraint .= PHP_EOL . $this->getTemplate('migration/on-constraint') |
|
| @@ 138-145 (lines=8) @@ | ||
| 135 | ->get(); |
|
| 136 | } |
|
| 137 | ||
| 138 | if($key['on_update']){ |
|
| 139 | $constraint .= PHP_EOL . $this->getTemplate('migration/on-constraint') |
|
| 140 | ->with([ |
|
| 141 | 'event' => 'Update', |
|
| 142 | 'action' => $key['on_update'] |
|
| 143 | ]) |
|
| 144 | ->get(); |
|
| 145 | } |
|
| 146 | ||
| 147 | return $constraint . ';'; |
|
| 148 | } |
|