From a5f4e4ff7a5c60e104a42fe64d475d5951342f58 Mon Sep 17 00:00:00 2001 From: thomashii Date: Sat, 18 Jun 2022 21:35:19 +0800 Subject: [PATCH] Fixed linter warnings --- .../orm/angel_migration_runner/lib/src/mariadb/table.dart | 8 ++++---- .../orm/angel_migration_runner/lib/src/mysql/table.dart | 8 ++++---- 2 files changed, 8 insertions(+), 8 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 08ed0b47..9161ea48 100644 --- a/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart +++ b/packages/orm/angel_migration_runner/lib/src/mariadb/table.dart @@ -46,7 +46,7 @@ abstract class MariaDbGenerator { } for (var ref in column.externalReferences) { - buf.write(' ' + compileReference(ref)); + buf.write(' ${compileReference(ref)}'); } return buf.toString(); @@ -54,7 +54,7 @@ abstract class MariaDbGenerator { static String compileReference(MigrationColumnReference ref) { var buf = StringBuffer('REFERENCES ${ref.foreignTable}(${ref.foreignKey})'); - if (ref.behavior != null) buf.write(' ' + ref.behavior!); + if (ref.behavior != null) buf.write(' ${ref.behavior!}'); return buf.toString(); } } @@ -147,8 +147,8 @@ 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))); + _stack.add( + 'ALTER COLUMN $name TYPE ${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 32d93f57..b244ee4e 100644 --- a/packages/orm/angel_migration_runner/lib/src/mysql/table.dart +++ b/packages/orm/angel_migration_runner/lib/src/mysql/table.dart @@ -46,7 +46,7 @@ abstract class MySqlGenerator { } for (var ref in column.externalReferences) { - buf.write(' ' + compileReference(ref)); + buf.write(' ${compileReference(ref)}'); } return buf.toString(); @@ -54,7 +54,7 @@ abstract class MySqlGenerator { static String compileReference(MigrationColumnReference ref) { var buf = StringBuffer('REFERENCES ${ref.foreignTable}(${ref.foreignKey})'); - if (ref.behavior != null) buf.write(' ' + ref.behavior!); + if (ref.behavior != null) buf.write(' ${ref.behavior!}'); return buf.toString(); } } @@ -147,8 +147,8 @@ 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))); + _stack.add( + 'ALTER COLUMN $name TYPE ${MySqlGenerator.columnType(MigrationColumn(type, length: length))}'); } @override