Closed mieszkou closed 5 days ago
Please, make sure to define the schema
key in the DB group you're using in the app/Config/Database.php
file. Only then the variable from the .env
file will be taken into account.
https://github.com/codeigniter4/CodeIgniter4/blob/develop/app/Config/Database.php#L112
PHP Version
7.4, 8.0, 8.1, 8.2, 8.3
CodeIgniter4 Version
4.5.5
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
SQL 2019
What happened?
In an SQLSRV database, the
database.default.schema
parameter from the.env
file is not recognized. The schema is always set todbo
, which appears to be hardcoded in thesystem/Database/SQLSRV/Connection.php
file:Steps to Reproduce
Using an SQLSRV database with a schema other than
dbo
.Expected Output
SELECT * FROM Table
Anything else?
No response