| @@ 256-275 (lines=20) @@ | ||
| 253 | * |
|
| 254 | * @return string |
|
| 255 | */ |
|
| 256 | public function getClobTypeDeclarationSQL(array $field) |
|
| 257 | { |
|
| 258 | if ( ! empty($field['length']) && is_numeric($field['length'])) { |
|
| 259 | $length = $field['length']; |
|
| 260 | ||
| 261 | if ($length <= static::LENGTH_LIMIT_TINYTEXT) { |
|
| 262 | return 'TINYTEXT'; |
|
| 263 | } |
|
| 264 | ||
| 265 | if ($length <= static::LENGTH_LIMIT_TEXT) { |
|
| 266 | return 'TEXT'; |
|
| 267 | } |
|
| 268 | ||
| 269 | if ($length <= static::LENGTH_LIMIT_MEDIUMTEXT) { |
|
| 270 | return 'MEDIUMTEXT'; |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||
| 274 | return 'LONGTEXT'; |
|
| 275 | } |
|
| 276 | ||
| 277 | /** |
|
| 278 | * {@inheritDoc} |
|
| @@ 1104-1123 (lines=20) @@ | ||
| 1101 | * |
|
| 1102 | * @return string |
|
| 1103 | */ |
|
| 1104 | public function getBlobTypeDeclarationSQL(array $field) |
|
| 1105 | { |
|
| 1106 | if ( ! empty($field['length']) && is_numeric($field['length'])) { |
|
| 1107 | $length = $field['length']; |
|
| 1108 | ||
| 1109 | if ($length <= static::LENGTH_LIMIT_TINYBLOB) { |
|
| 1110 | return 'TINYBLOB'; |
|
| 1111 | } |
|
| 1112 | ||
| 1113 | if ($length <= static::LENGTH_LIMIT_BLOB) { |
|
| 1114 | return 'BLOB'; |
|
| 1115 | } |
|
| 1116 | ||
| 1117 | if ($length <= static::LENGTH_LIMIT_MEDIUMBLOB) { |
|
| 1118 | return 'MEDIUMBLOB'; |
|
| 1119 | } |
|
| 1120 | } |
|
| 1121 | ||
| 1122 | return 'LONGBLOB'; |
|
| 1123 | } |
|
| 1124 | ||
| 1125 | /** |
|
| 1126 | * {@inheritdoc} |
|