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