微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么我不能用 mikro-orm 创建数据库?

如何解决为什么我不能用 mikro-orm 创建数据库?

所以我试图用 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,但它似乎不起作用。

解决方法

mikro-orm 文档中没有提到使用createdb mikro-orm docs 创建数据库的选项。

您所关注的视频在他的 bash_profile.sh 中设置了一些脚本或别名,并安装了 PG-CLI 以使用终端在本地执行此操作。

如何以本机方式执行此操作的解决方案: 不会通过在终端中运行 createdb 来创建数据库。 首先从 EDB Installer site 安装 postgresql 服务器,它提供了运行您的 postgresql 服务器的所有工具以及一个名为 pgAdmin 的客户端以与您的 postgresql 服务器交互。

一旦您安装了所有要求。打开 pgAdmin 并创建数据库,如下图所示。 enter image description here

如果您在如何通过 mikro-orm 从项目迁移到 postgresql 方面遇到问题,请告诉我。我可以帮忙

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。