Updated angel_migration_runner
This commit is contained in:
parent
28c4705898
commit
91f405811b
2 changed files with 5 additions and 6 deletions
|
@ -3,6 +3,9 @@
|
|||
## 4.0.0-beta.3
|
||||
|
||||
* Updated README
|
||||
* Fixed NNBD issue
|
||||
* Default database column to `varchar` type
|
||||
* Default the `varchar` column size to 256
|
||||
|
||||
## 4.0.0-beta.2
|
||||
|
||||
|
|
|
@ -6,11 +6,7 @@ import 'package:charcode/ascii.dart';
|
|||
abstract class PostgresGenerator {
|
||||
static String columnType(MigrationColumn column) {
|
||||
var str = column.type.name;
|
||||
if (column.length != null) {
|
||||
return '$str(${column.length})';
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
return '$str(${column.length})';
|
||||
}
|
||||
|
||||
static String compileColumn(MigrationColumn column) {
|
||||
|
@ -147,7 +143,7 @@ class PostgresAlterTable extends Table implements MutableTable {
|
|||
}
|
||||
|
||||
@override
|
||||
void changeColumnType(String name, ColumnType type, {int? length}) {
|
||||
void changeColumnType(String name, ColumnType type, {int length = 256}) {
|
||||
_stack.add('ALTER COLUMN "$name" TYPE ' +
|
||||
PostgresGenerator.columnType(MigrationColumn(type, length: length)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue