所以我尝试用mikro-orm和postgresql在visualstudio代码中创建数据库,但出现了一个错误:
createdb lireddit
The name "createdb" is not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling
name, as well as the presence and correctness of the path, and then try again.
+ createdb <<<< lireddit
+ CategoryInfo : ObjectNotFound: (createdb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException在此之前,我安装了mikro-orm和postgresql和yarn,但它似乎不起作用。
发布于 2021-07-03 05:09:44
没有使用 createdb mikro-orm docs创建数据库的选项,如mikro orm文档中所述。
您所关注的视频将您引导至此处,它在他的bash_profile.sh中设置了一些脚本或别名,并安装了PG-CLI以在本地使用终端创建数据库。
如何以本地方式创建数据库的解决方案:不会在终端中运行createdb来创建数据库。首先,从EDB Installer site安装postgresql server,它提供了运行postgresql服务器的所有工具,还提供了一个名为pgAdmin的客户端来与postgresql服务器进行交互。
一旦你安装了所有的需求。打开pgAdmin并创建数据库,如下图所示。

如果您在如何通过mikro-orm从您的项目迁移到postgresql的过程中遇到问题,请与我联系。我能帮上忙
https://stackoverflow.com/questions/67549320
复制相似问题