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