laravel-oci8
laravel-oci8 copied to clipboard
Length of index names in Oracle 12.2 or higher.
Summary of problem or feature request
In Oracle 12.2 or higher the name length of indexes increased from 30 to 128 bytes. However migrations will still cut off index names longer than 30 bytes.
System details
Oracle database >= 12.2
Thanks for this info. I think we can enhance the package and add an ENV config that defaults to 30 for max object name length.
Is this info also applicable for table, column, sequence name, etc?
-- Edit --
It seems like it's applicable on all objects as per SO post https://stackoverflow.com/questions/756558/what-is-the-maximum-length-of-a-table-name-in-oracle.
Summary of problem or feature request
this is still an issue.
Currently with Oracle 12 the table name can be created with more than 30 characters but all objects like trigger, sequence etc are still restricted to 30 characters. As example a table can be named as
LONG_TABLE_NAME_WITH_A_VERY_LONG_NAME_TEST01
but objects like sequence and trigger are created like :
LONG_TABLE_NAME_WITH_A_VERY_LO
This lead to a situation where if you have two long table with same 30 char initial part every object will fail during migrations.
So, as example:
LONG_TABLE_NAME_WITH_A_VERY_LONG_NAME_TEST01
LONG_TABLE_NAME_WITH_A_VERY_LONG_NAME_TEST02
LONG_TABLE_NAME_WITH_A_VERY_LONG_NAME_TEST03
all subsequential migration after LONG_TABLE_NAME_WITH_A_VERY_LONG_NAME_TEST01 will fail because all objects already exists as LONG_TABLE_NAME_WITH_A_VERY_LO (triggers and sequences)
System details
Oracle database >= 12.2 yajra/laravel-oci8 Version 7.0.1
@yajra sorry if I bother you, this issue is in the right place ? I had the suspect that I put this issue in the wrong place and is passed unnoticed... if is not this case please sorry again
@mdemori no worries, this is the right place I guess. Anyways, I might not be able to work on this yet so if you can, please do not hesitate to submit a PR. You can continue working on the PR I created https://github.com/yajra/laravel-oci8/pull/555.
Some items on the PR that needs to be updated:
- Use config instead of fetching via env.
- Tests