| @@ 2324-2326 (lines=3) @@ | ||
| 2321 | if (is_string($def)) { |
|
| 2322 | $constraints[] = 'CHECK (' . $def . ')'; |
|
| 2323 | } else { |
|
| 2324 | if (isset($def['min'])) { |
|
| 2325 | $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; |
|
| 2326 | } |
|
| 2327 | ||
| 2328 | if (isset($def['max'])) { |
|
| 2329 | $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; |
|
| @@ 2328-2330 (lines=3) @@ | ||
| 2325 | $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; |
|
| 2326 | } |
|
| 2327 | ||
| 2328 | if (isset($def['max'])) { |
|
| 2329 | $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; |
|
| 2330 | } |
|
| 2331 | } |
|
| 2332 | } |
|
| 2333 | ||