How to rename a database column?

db-column
sql
db-alter-table
database
db-table
(Dmitry Fedyuk) #1

Unfortunately, MySQL does not allow to rename a database column without repeating the column’s definition:
The Magento 2 core classes do not have such method too.
So, I implemented such function myrself.

0 Likes

How to alter a database table?
How to change (modify) a column definition for a database table
How to add an index to a database table
How to delete (drop) a column from a database table?
How to change (modify) a column definition for a database table
How to rename a database table
How to add a column to a database table?
How to delete (drop) an index from a database table
How to add a foreign key to a database table
How to delete (drop) a foreign key from a database table
(Dmitry Fedyuk) #2

See also:

0 Likes