From 23a8d94cd0a628a0da04aa1dc6e7a895fb5608e8 Mon Sep 17 00:00:00 2001 From: Martin Zander Date: Thu, 20 Jun 2024 18:04:44 +0200 Subject: [PATCH] change MySQL/MariaDB SQL statement for changeColumnType method --- packages/orm/angel_migration_runner/lib/src/mariadb/table.dart | 2 +- packages/orm/angel_migration_runner/lib/src/mysql/table.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart b/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart index c64b7607..5532d81a 100644 --- a/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart +++ b/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart @@ -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 diff --git a/packages/orm/angel_migration_runner/lib/src/mysql/table.dart b/packages/orm/angel_migration_runner/lib/src/mysql/table.dart index 897dd47d..34302b06 100644 --- a/packages/orm/angel_migration_runner/lib/src/mysql/table.dart +++ b/packages/orm/angel_migration_runner/lib/src/mysql/table.dart @@ -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