change MySQL/MariaDB SQL statement for changeColumnType method

This commit is contained in:
Martin Zander 2024-06-20 18:04:44 +02:00
parent e1679a5115
commit 23a8d94cd0
2 changed files with 2 additions and 2 deletions

View file

@ -153,7 +153,7 @@ class MariaDbAlterTable extends Table implements MutableTable {
@override
void changeColumnType(String name, ColumnType type, {int length = 256}) {
_stack.add(
'ALTER COLUMN $name TYPE ${MariaDbGenerator.columnType(MigrationColumn(type, length: length))}');
'MODIFY $name ${MariaDbGenerator.columnType(MigrationColumn(type, length: length))}');
}
@override

View file

@ -152,7 +152,7 @@ class MysqlAlterTable extends Table implements MutableTable {
@override
void changeColumnType(String name, ColumnType type, {int length = 256}) {
_stack.add(
'ALTER COLUMN $name TYPE ${MySqlGenerator.columnType(MigrationColumn(type, length: length))}');
'MODIFY $name ${MySqlGenerator.columnType(MigrationColumn(type, length: length))}');
}
@override