I have issue with table naming case sensitivity. As far as I can debug this probably isn't the place for this issue, but any help will be higlhy appreciated.
In development environment, everything (same php, same oracle db, but not iis) under docker everything works, DB created via Laravel's migrations. TEST/PROD DB are created long long time ago.
Additional hint: setting PDO::ATTR_CASE in yajra/laravel-oci8 doesn't work, somehow is totally ignored.
Code snippet of problem
Non working:
In tinker execute any of following code:
TableName::all()
DB::connection('oracle')->table('table_name')->select('*')->first();
The repsonse is following error:
Illuminate\Database\QueryException with message 'Error Code : 942
Error Message : ORA-00942: table or view does not exist
Position : 29
Statement : select * from (select * from "TABLE_NAME") where rownum = 1
Bindings : []
(SQL: select * from (select * from "TABLE_NAME") where rownum = 1)'
Working (narrowing the problem)
Create some random api endpoint with following content:
\DB::enableQueryLog();
$query = <<<END
SELECT * FROM "table_name" WHERE ROWNUM = 1
END;
$tables = \DB::connection('oracle')->select($query);
dd($tables); // ok
If I manually update following file vendor\yajra\laravel-oci8\src\Oci8\Query\Grammars\OracleGrammar.php by commenting out 275th ($value = Str::upper($value);) line everything works. I know that this isn't the way, but I needed somehow to narrow search.
Summary of problem or feature request
I have issue with table naming case sensitivity. As far as I can debug this probably isn't the place for this issue, but any help will be higlhy appreciated.
In development environment, everything (same php, same oracle db, but not iis) under docker everything works, DB created via Laravel's migrations. TEST/PROD DB are created long long time ago.
Additional hint: setting
PDO::ATTR_CASE
in yajra/laravel-oci8 doesn't work, somehow is totally ignored.Code snippet of problem
Non working:
In tinker execute any of following code:
TableName::all()
DB::connection('oracle')->table('table_name')->select('*')->first();
The repsonse is following error:Working (narrowing the problem)
Create some random api endpoint with following content:
If I manually update following file
vendor\yajra\laravel-oci8\src\Oci8\Query\Grammars\OracleGrammar.php
by commenting out 275th ($value = Str::upper($value);
) line everything works. I know that this isn't the way, but I needed somehow to narrow search.System details
Server:
Database:
Tech stack: