You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The alter table RENAME COLUMN old TO new syntax is relatively new to MySQL and isn't supported in all versions. (I have a somewhat older distro provided version of MariaDB that I don't think supports it.)
I'm wondering if it might be better to use the MySQL CHANGE old new type version that has been around for a long time. I actually thought that's what Masonite ORM was doing because otherwise I'm not sure why rename requires the data type.
Additionally, is renaming and moving a field (using after) valid in a migration? For example:
If so, depending how the SQL to do this is built, the RENAME COLUMN version may not work. I don't think it allows AFTER to be specified in the rename column syntax, but CHANGE should work correctly.
The text was updated successfully, but these errors were encountered:
tpow
added
the
bug
An existing feature is not working as intended
label
Nov 12, 2021
The
alter table RENAME COLUMN old TO new
syntax is relatively new to MySQL and isn't supported in all versions. (I have a somewhat older distro provided version of MariaDB that I don't think supports it.)See https://dev.mysql.com/doc/refman/8.0/en/alter-table.html#alter-table-redefine-column
I'm wondering if it might be better to use the MySQL
CHANGE old new type
version that has been around for a long time. I actually thought that's what Masonite ORM was doing because otherwise I'm not sure why rename requires the data type.Additionally, is renaming and moving a field (using after) valid in a migration? For example:
table.rename("field1", "field3", "string").after("field2")
If so, depending how the SQL to do this is built, the RENAME COLUMN version may not work. I don't think it allows AFTER to be specified in the rename column syntax, but CHANGE should work correctly.
The text was updated successfully, but these errors were encountered: