| @@ 335-344 (lines=10) @@ | ||
| 332 | * @param bool $quoted True to quote identifier. |
|
| 333 | * @return string |
|
| 334 | */ |
|
| 335 | protected function enumConstraint($quoted = false) |
|
| 336 | { |
|
| 337 | if (empty($this->enumConstraint)) { |
|
| 338 | $this->enumConstraint = $this->generateName('enum'); |
|
| 339 | } |
|
| 340 | ||
| 341 | return $quoted |
|
| 342 | ? $this->table->driver()->identifier($this->enumConstraint) |
|
| 343 | : $this->enumConstraint; |
|
| 344 | } |
|
| 345 | ||
| 346 | /** |
|
| 347 | * Default constrain name. |
|
| @@ 352-361 (lines=10) @@ | ||
| 349 | * @param bool $quoted |
|
| 350 | * @return string |
|
| 351 | */ |
|
| 352 | protected function defaultConstrain($quoted = false) |
|
| 353 | { |
|
| 354 | if (empty($this->defaultConstraint)) { |
|
| 355 | $this->defaultConstraint = $this->generateName('default'); |
|
| 356 | } |
|
| 357 | ||
| 358 | return $quoted |
|
| 359 | ? $this->table->driver()->identifier($this->defaultConstraint) |
|
| 360 | : $this->defaultConstraint; |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|
| 364 | * Enum constrain statement. |
|