| @@ 257-276 (lines=20) @@ | ||
| 254 | * |
|
| 255 | * @return string |
|
| 256 | */ |
|
| 257 | public function getClobTypeDeclarationSQL(array $field) |
|
| 258 | { |
|
| 259 | if ( ! empty($field['length']) && is_numeric($field['length'])) { |
|
| 260 | $length = $field['length']; |
|
| 261 | ||
| 262 | if ($length <= static::LENGTH_LIMIT_TINYTEXT) { |
|
| 263 | return 'TINYTEXT'; |
|
| 264 | } |
|
| 265 | ||
| 266 | if ($length <= static::LENGTH_LIMIT_TEXT) { |
|
| 267 | return 'TEXT'; |
|
| 268 | } |
|
| 269 | ||
| 270 | if ($length <= static::LENGTH_LIMIT_MEDIUMTEXT) { |
|
| 271 | return 'MEDIUMTEXT'; |
|
| 272 | } |
|
| 273 | } |
|
| 274 | ||
| 275 | return 'LONGTEXT'; |
|
| 276 | } |
|
| 277 | ||
| 278 | /** |
|
| 279 | * {@inheritDoc} |
|
| @@ 1116-1135 (lines=20) @@ | ||
| 1113 | * |
|
| 1114 | * @return string |
|
| 1115 | */ |
|
| 1116 | public function getBlobTypeDeclarationSQL(array $field) |
|
| 1117 | { |
|
| 1118 | if ( ! empty($field['length']) && is_numeric($field['length'])) { |
|
| 1119 | $length = $field['length']; |
|
| 1120 | ||
| 1121 | if ($length <= static::LENGTH_LIMIT_TINYBLOB) { |
|
| 1122 | return 'TINYBLOB'; |
|
| 1123 | } |
|
| 1124 | ||
| 1125 | if ($length <= static::LENGTH_LIMIT_BLOB) { |
|
| 1126 | return 'BLOB'; |
|
| 1127 | } |
|
| 1128 | ||
| 1129 | if ($length <= static::LENGTH_LIMIT_MEDIUMBLOB) { |
|
| 1130 | return 'MEDIUMBLOB'; |
|
| 1131 | } |
|
| 1132 | } |
|
| 1133 | ||
| 1134 | return 'LONGBLOB'; |
|
| 1135 | } |
|
| 1136 | ||
| 1137 | /** |
|
| 1138 | * {@inheritdoc} |
|