| @@ 2316-2318 (lines=3) @@ | ||
| 2313 | if (is_string($def)) { |
|
| 2314 | $constraints[] = 'CHECK (' . $def . ')'; |
|
| 2315 | } else { |
|
| 2316 | if (isset($def['min'])) { |
|
| 2317 | $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; |
|
| 2318 | } |
|
| 2319 | ||
| 2320 | if (isset($def['max'])) { |
|
| 2321 | $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; |
|
| @@ 2320-2322 (lines=3) @@ | ||
| 2317 | $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; |
|
| 2318 | } |
|
| 2319 | ||
| 2320 | if (isset($def['max'])) { |
|
| 2321 | $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; |
|
| 2322 | } |
|
| 2323 | } |
|
| 2324 | } |
|
| 2325 | ||