| @@ 419-426 (lines=8) @@ | ||
| 416 | foreach ($constraints as $constraint) { |
|
| 417 | if (preg_match('/ARRAY\[([^\]]+)\]/', $constraint['consrc'], $matches)) { |
|
| 418 | $enumValues = explode(',', $matches[1]); |
|
| 419 | foreach ($enumValues as &$value) { |
|
| 420 | if (preg_match("/^'?(.*?)'?::(.+)/", trim($value), $matches)) { |
|
| 421 | //In database: 'value'::TYPE |
|
| 422 | $value = $matches[1]; |
|
| 423 | } |
|
| 424 | ||
| 425 | unset($value); |
|
| 426 | } |
|
| 427 | ||
| 428 | $column->enumValues = $enumValues; |
|
| 429 | $column->constrainName = $constraint['conname']; |
|
| @@ 212-220 (lines=9) @@ | ||
| 209 | $matches |
|
| 210 | )) { |
|
| 211 | $enumValues = explode(',', $matches[1]); |
|
| 212 | foreach ($enumValues as &$value) { |
|
| 213 | //Trimming values |
|
| 214 | if (preg_match("/^'?(.*?)'?$/", trim($value), $matches)) { |
|
| 215 | //In database: 'value' |
|
| 216 | $value = $matches[1]; |
|
| 217 | } |
|
| 218 | ||
| 219 | unset($value); |
|
| 220 | } |
|
| 221 | ||
| 222 | $column->enumValues = $enumValues; |
|
| 223 | } |
|