I am trying to figure out if cx_Oracle 6.1 has support for table names and column names being longer than 30 characters. We are migrating to Oracle from another database which supported longer identifiers so we have quite a few of these identifiers.
Oracle 12cr2 now supports this so I am able to migrate all the data without having to change identifier names.
However when I try and access the data ( django 1.11.7 and cx_oracle), I end up getting an error:
django.db.utils.DatabaseError: ORA-00904: "TABLE_NAME"."COLUMN_NAME_LONGER_THAN_TH403B": invalid identifier
The actual column name for e.g. could be COLUMN_NAME_LONGER_THAN_THIRTY_BYTES
Note - This is a made up example so the mangling scheme used for the column if this was a real example might be different.
But basically, I see that the column name is shortened to 30 characters with some kind of a mangling scheme. The database obviously throws the invalid identifier error.
Is there some cx_Oracle connection parameter / setting I could be using or some environment variable etc that can resolve this?
Or is this something I need to wait for a higher release of cx_Oracle?
I checked within django quite a bit but I dont think this is happening inside of django which is why I am asking this question in this forum.
Yes, I do have the option of renaming the tables and columns but given that 12cr2 officially supports this I am trying to avoid having to change application code.
Thanks & Regards
I think I did not check enough. This is something within django... Turns out i have to explicitly specify the column_name in the field definition quoted and in lowercase. Discussion is here: https://docs.djangoproject.com/en/2.0/ref/models/options/