Skip to content

Add support for the "change"-function #39

Closed
@4ice

Description

@4ice

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):

  1. Add a column of the desired type (ALTER TABLE table_name ADD COLUMN field2 TEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE utf8mb4_unicode_ci; )
  2. Fill values in this column with the column you want to change the data type (UPDATE table_name SET name2 = name;)
  3. Remove the previous column (ALTER TABLE table_name DROP COLUMN name;)
  4. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions