简体   繁体   English

aqueduct db upgrade 无法连接到数据库

[英]aqueduct db upgrade can't connect to database

  • windows 10窗口 10
  • postgres version - 13.0 postgres 版本 - 13.0
  • aqueduct version - 3.3.0+1渡槽版本 - 3.3.0+1
  • created the database and user correctly正确创建了数据库和用户
  • created the migration创建迁移

I can connect to database using psql .我可以使用psql连接到数据库。

postgresql.conf contains listen_addresses = '*', port = 5432 postgresql.conf 包含listen_addresses = '*', port = 5432

When I enter the command :当我输入命令时:

aqueduct db upgrade --connect postgres://app_user:password@localhost:5432/app

I get error :我得到错误:

There was an error connecting to the database 'app_user:password@localhost:5432/app'. Reason: unable to connect to database.

I have searched hundreds of sources already.我已经搜索了数百个来源。 This is a new problem that I am not the only one facing.这是一个新问题,我不是唯一面临的问题。 Nobody has solved it yet!还没有人解决!

Hero, help me please!大侠,请帮帮我!

Hello brothers in misfortune!不幸的兄弟们你好!

I found a solution to this problem!我找到了解决这个问题的方法!

I rolled back the version of PostgreSQL to 10.14 .我将PostgreSQL的版本回滚到 10.14 It's stable.它很稳定。

My file pubspec.yaml I changed to this:我的文件pubspec.yaml我改为:

dependencies:
  aqueduct: ^4.0.0-b1

dev_dependencies:
  test: ^1.0.0
  aqueduct_test: ^2.0.0-b1

BUT IMPORTANT.但很重要。 Enter the command: pub global activate aqueduct 4.0.0-b1输入命令: pub global activate aqueduct 4.0.0-b1

I couldn't solve this problem for 3 days!我3天没能解决这个问题! I'm happy...我很高兴...

I hope I can help someone else.我希望我能帮助别人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM