简体   繁体   中英

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?

Solved. Problem seemed to be with PostgreSQL 13. I installed PostgreSQL 12.4 and ran the command to create the database migration file. Then ran the database update command and it worked immediately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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