yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Table naming case sensitivity issue #130

Open borisjotic opened 1 year ago

borisjotic commented 1 year ago

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:

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.

System details

Server:

Database:

Tech stack: