postgresql - Aqueduct failed to execute db migration file
问题描述
I'm trying to learn Dart and Aqueduct. I'm following the Aqueduct tutorial. Up to now everything worked ok. But when connecting to the database I get an error.
I'm using:
Windows 10
PostreSQL 13
Dart 2.10.0
Aqueduct 4.0.0-b1
I get the following error:
*** There was an error connecting to the database 'heroes_user:password@localhost:5432/heroes'. Reason: unable to connect to database.
Command prompt with error
I can connect to the database using psql
or DBeaver
, so username (heroes_user), password (password) and database (heroes) are correct.
I started with Aqueduct 3, but after I search for the error I noticed other people had similar problems and the suggestion was to upgrade to Aqueduct 4. So I executed pug get + updated pubspec.yaml
+ pub global activate aqueduct 4.0.0-B1
. This did not result in any progress.
Other suggestions I found were to change the password authentication method. I modified pg_hba.conf
to include the line:
host all all 127.0.0.1/32 md5
But this did not have any success either.
I'm not sure in which direction to search anymore. I've noticed similar questions, but without actual answers. Any suggestions?
解决方案
解决了。问题似乎出在 PostgreSQL 13 上。我安装了 PostgreSQL 12.4 并运行命令来创建数据库迁移文件。然后运行数据库更新命令,它立即工作。
推荐阅读
- javascript - 作为 Promise.all 的一部分,在 X 秒后调用异步函数
- python - 如何对列表中的每个元素求和?
- post - 无法使用 Google 应用脚本创建 KuCoin 订单
- python-3.x - 如何创建群组 | 通过考虑相同的连续分组(在 Pandas DataFrame 中)列的子组(预定义)循环顺序?
- javascript - 反应来自 axios 的动态评论内容不渲染
- xamarin.forms - 如何在xamarin表单ios中隐藏标签栏导航标题
- text - Saitek/Logitech X52 Pro 操纵杆使用哪种文本编码?
- c# - 从 sql server 表加载数据并使用 dapper 填充文本框
- javascript - 我有一个数字数组,我想将它添加到 JavaScript 的输入自动填充列表中
- javascript - 如果我从 elementor 页面构建器保存表格,则 DataTable 导出按钮脚本不起作用