网站搜索

node.js - 在与 type-graphql 一起使用时,TypeORM CLI 没有生成迁移


我想将 TypeORM 与 TypeGraphQL 一起使用。

TypeGraphQL 甚至有一个针对这种情况的示例。

但是当我那样使用它并尝试从中生成迁移(使用 TypeORM CLI 并运行 migration:generate)时,什么也没有发生。

日志中没有错误,没有其他日志,什么都没有。

这是我正在运行的命令:

ts-node -P tsconfig.typeorm.json --log-error -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:generate -n UserEntity

GitHub上的问题:https://github.com/typeorm/typeorm/issues/4361