|
28 | 28 | use Utopia\Migration\Resources\Database\Columns\Integer; |
29 | 29 | use Utopia\Migration\Resources\Database\Columns\IP; |
30 | 30 | use Utopia\Migration\Resources\Database\Columns\Line; |
| 31 | +use Utopia\Migration\Resources\Database\Columns\MediumText; |
31 | 32 | use Utopia\Migration\Resources\Database\Columns\Point; |
32 | 33 | use Utopia\Migration\Resources\Database\Columns\Polygon; |
| 34 | +use Utopia\Migration\Resources\Database\Columns\RegularText; |
33 | 35 | use Utopia\Migration\Resources\Database\Columns\Relationship; |
34 | 36 | use Utopia\Migration\Resources\Database\Columns\Text; |
35 | 37 | use Utopia\Migration\Resources\Database\Columns\URL; |
@@ -1090,6 +1092,45 @@ private function exportColumns(int $batchSize): void |
1090 | 1092 | updatedAt: $column['$updatedAt'] ?? '', |
1091 | 1093 | ); |
1092 | 1094 | break; |
| 1095 | + |
| 1096 | + case Column::TYPE_TEXT: |
| 1097 | + $col = new RegularText( |
| 1098 | + $column['key'], |
| 1099 | + $table, |
| 1100 | + required: $column['required'], |
| 1101 | + default: $column['default'], |
| 1102 | + array: $column['array'], |
| 1103 | + size: $column['size'] ?? 65535, |
| 1104 | + createdAt: $column['$createdAt'] ?? '', |
| 1105 | + updatedAt: $column['$updatedAt'] ?? '', |
| 1106 | + ); |
| 1107 | + break; |
| 1108 | + |
| 1109 | + case Column::TYPE_MEDIUMTEXT: |
| 1110 | + $col = new MediumText( |
| 1111 | + $column['key'], |
| 1112 | + $table, |
| 1113 | + required: $column['required'], |
| 1114 | + default: $column['default'], |
| 1115 | + array: $column['array'], |
| 1116 | + size: $column['size'] ?? 16777215, |
| 1117 | + createdAt: $column['$createdAt'] ?? '', |
| 1118 | + updatedAt: $column['$updatedAt'] ?? '', |
| 1119 | + ); |
| 1120 | + break; |
| 1121 | + |
| 1122 | + case Column::TYPE_LONGTEXT: |
| 1123 | + $col = new MediumText( |
| 1124 | + $column['key'], |
| 1125 | + $table, |
| 1126 | + required: $column['required'], |
| 1127 | + default: $column['default'], |
| 1128 | + array: $column['array'], |
| 1129 | + size: $column['size'] ?? 2147483647, |
| 1130 | + createdAt: $column['$createdAt'] ?? '', |
| 1131 | + updatedAt: $column['$updatedAt'] ?? '', |
| 1132 | + ); |
| 1133 | + break; |
1093 | 1134 | } |
1094 | 1135 |
|
1095 | 1136 | if (!isset($col)) { |
|
0 commit comments