| @@ -113,14 +113,18 @@ | ||
| 113 | 113 | public function sanitizeColumnData( array $customColumn ) { |
| 114 | 114 | |
| 115 | 115 | $name = $customColumn['name'] ?? false; |
| 116 | 116 | $type = $customColumn['type'] ?? false; |
| 117 | + $dataType = $customColumn['data_type'] ?? 'text'; | |
| 117 | 118 | |
| 118 | 119 | $type = Schema::isValidColumnType( $type ) ? $type : false; |
| 120 | + $dataType = Schema::isValidDataType( $dataType ) ? $dataType : 'text'; | |
| 119 | 121 | |
| 120 | 122 | if ( ! $name || ! $type ) { |
| 121 | 123 | return false; |
| 122 | 124 | } |
| 125 | + | |
| 126 | + $customColumn['data_type'] = $dataType; | |
| 123 | 127 | |
| 124 | 128 | return $customColumn; |
| 125 | 129 | } |
| 126 | 130 | |