Closed
Description
It would be great if this feature was supported.
As I understand, the following would have to be done in order to change a field (This example changes a field called "name" from a varchar to text):
- Add a column of the desired type (ALTER TABLE table_name ADD COLUMN field2 TEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE
utf8mb4_unicode_ci
; ) - Fill values in this column with the column you want to change the data type (UPDATE table_name SET name2 = name;)
- Remove the previous column (ALTER TABLE table_name DROP COLUMN name;)
- Change the name of the new column (ALTER TABLE table_name CHANGE name2 name;)
Would it be possible to implement this? Or is there already another way to do this?