yajra / laravel-oci8

Oracle DB driver for Laravel via OCI8

Home Page:https://yajrabox.com/docs/laravel-oci8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No way to identify sequences with longer table names

gergelykralik opened this issue · comments

Summary of problem or feature request

Use a prefix for sequence names (as opposed to the now used postfix), so the sequence name always starts with a prefix of SQ_ or SEQ_. It would be easier to distinguish sequences. If the table name is long the postfix gets cut off.

It would be nice to have a config option to increase the 30 char limit. In Oracle DB 12+ the upper limit is 128 bytes.

Code snippet of problem

    private function createObjectName($prefix, $table, $col, $type)
    {
        // max object name length is 30 chars
        return substr($prefix.$table.'_'.$col.'_'.$type, 0, 30);
    }

System details

  • Operating System: Linux
  • PHP Version: 9.2
  • Laravel Version: 9.x
  • Laravel-OCI8 Version: 9.x

Fixed via #768 & #767, thanks!