tattersoftware / codeigniter4-schemas

Database schema management, for CodeIgniter 4
MIT License
22 stars 10 forks source link

unable connect postgre database #22

Closed cajima12 closed 3 years ago

cajima12 commented 3 years ago

Goodnight.

I am following the github instructions and when I perform the actions on a mysql database everything works perfectly.

However, when I configure a database in postgre, launching php spark schemas always tells me the same error. I have tried to locate the error but cannot.

"PS C: \ wamp64 \ www \ tatter-core> php spark schemas

CodeIgniter v4.1.1 Command Line Tool - Server Time: 2021-03-02 15:21:20 UTC-06: 00

[CodeIgniter \ Database \ Exceptions \ DatabaseException]

Unable to connect to the database.

at SYSTEMPATH \ Database \ BaseConnection.php: 395 "

However if it connects correctly in normal functionality, that is, I have access to data, I can make queries, etc.

I have all the drivers installed and it is functional both locally and on an AWS server.

Could you tell me what I am missing?

my .env

database.default.DSN = pgsql: host = host-amazon.amazonaws.com; port = 5432; dbname = name-base; user = my-user; password = my-password database.default.hostname = host-amazon.amazonaws.com database.default.database = name-base database.default.username = my-user database.default.password = my-password database.default.DBDriver = Postgre database.default.port = 5432 database.default.DBdebug = true

Thanks a lot.

MGatner commented 3 years ago

You are probably missing a necessary extension on CLI that you have available via the web. Regardless this does not appear to be an issue with Schemas. If you need more help I recommend starting a thread on the support forums: https://forum.codeigniter.com/forum-28.html