我正在尝试使用命令“aqueduct db generate”从模型生成迁移。
这是 lib > model 下的模型“request.dart”(我也有其他模型,它们已经迁移而没有任何问题):
导入“包:dbapi/dbapi.dart”;
类请求扩展 ManagedObject<_Request> 实现 _Request {}
类_请求{
@managedPrimaryKey
整数索引;
字符串描述;
}
然而,它正在创建一个空迁移,因为它无法识别新模型 - “请求”。以下是“aqueduct db generate”的输出
-- Aqueduct CLI Version: 2.5.0+1
-- Aqueduct project version: 2.5.0+1
-- Replaying migration files...
Replaying version 1
Replaying version 2
Replaying version 3
-- The following ManagedObject<T> subclasses were found:
Question
UserProfile
* If you were expecting more declarations, ensure the files are visible in the application library file.
-- Created new migration file (version 4).
注意:新模型“request.dart”与我可以迁移的以前模型具有相同的文件权限。
有没有其他人遇到同样的问题?感谢帮助!