agungsugiarto / codeigniter4-eloquent

The Illuminate Database package for CodeIgniter 4
MIT License
25 stars 8 forks source link

Bug Fix : postgre driver name with lower case #4

Closed samsonasik closed 4 years ago

samsonasik commented 4 years ago

for postgresql, driver name in CI4 is named "postgre" instead of "Postgre"

agungsugiarto commented 4 years ago

Testing on heroku with config driver name postgre will be error Screenshot_20200806-225253.png

samsonasik commented 4 years ago

tried with configure in the .env, it requires lower case, not in front of pc, probably saver to strtolower() first?

samsonasik commented 4 years ago

somehow, in my side, it read DBDriver property at https://github.com/codeigniter4/CodeIgniter4/blob/3b634e0facd25ed2e1996a8801e66ec201839c22/system/Database/Postgre/Connection.php#L56

agungsugiarto commented 4 years ago

But, refer from docs link Database Configuaration explanation of values DBDriver for posgre is using capital letters Pak @samsonasik.

image

samsonasik commented 4 years ago

oh, ok, that's probably my config then. I will check when I back to pc.

samsonasik commented 4 years ago

Looking at the BaseConnection class, there is condition check lower "postgre":

https://github.com/codeigniter4/CodeIgniter4/blob/3b634e0facd25ed2e1996a8801e66ec201839c22/system/Database/BaseConnection.php#L1496

Probably requires to update to "Postgre" in all places in CodeIgniter 4 side. I will create a PR to CodeIgniter repo about it.

I am closing it.

samsonasik commented 4 years ago

Here is the PR https://github.com/codeigniter4/CodeIgniter4/pull/3457