Hi this error happens when i try to execute db generate, with existed migration file.
If i delete first migration, new migration will be generated normally.
MacBook-Pro-MacBook:pinta_server pro$ aqueduct db generate -- Aqueduct CLI Version: 4.0.0-b1 -- Aqueduct project version: 4.0.0-b1 Replaying versions: 1... *** Uncaught error Bad state: NoSuchMethodError: The getter 'length' was called on null. Receiver: null Tried calling: length **** Stacktrace
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 _ClassMirror.newInstance (dart:mirrors-patch/mirrors_impl.dart:653:44)
#2 Executable.instanceOf (<data:application/dart>:15:813)
#3 SchemaBuilderExecutable.execute (<data:application/dart>:14:873)
#4 main (<data:application/dart>:10:35)
#5 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:32)
#6 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
Now my migrations folder look like
migrations/
00000001_initial.migration.dart
00000001_initial.migration.dart
class Migration1 extends Migration {
@override
Future upgrade() async { database.createTable(SchemaTable("stores", [SchemaColumn("id", ManagedPropertyType.integer, isPrimaryKey: true, autoincrement: true, isIndexed: false, isNullable: false, isUnique: false),SchemaColumn("title", ManagedPropertyType.string, isPrimaryKey: false, autoincrement: false, isIndexed: false, isNullable: false, isUnique: false)])); }
@override Future downgrade() async {}
@override Future seed() async {}
}