postgresqldartaqueduct

aqueduct db upgrade cannot connect to database


I have problem with connecting my aqueduct server to postgres database. Informations and things i have done:

In postgresql.conf set

listen_addresses = '*'
port = 5432

In pg_hba.conf added lines

host    all             all             0.0.0.0/0               md5
host    all             all             ::0/0                   md5

Now I want to connect to my database with command:

aqueduct db upgrade --connect postgres://lit_test_user:czinczolada123@localhost:5432/lit_test

Error I get is: There was an error connecting to the database 'lit_test_user:czinczolada123@localhost:5432/lit_test'. Reason: unable to connect to database.
I don't know what I did wrong, because using psql shell connects just fine.


Solution

  • I rolled back the version of PostgreSQL to 10.14. It's stable.

    And pubspec.yaml I changed to this:

    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