Opened 3 months ago

Closed 3 months ago

#33707 closed New feature (duplicate)

Allow Oracle table names to be over 30 characters

Reported by: Scott Ertel Owned by: nobody
Component: Database layer (models, ORM) Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently django.db.backends.oracle sets the max length of a table to 30 characters, and models with names longer than that are hashed. This makes it difficult for users of the database (i.e. analytics users) to work with the tables in their queries.

Oracle has allowed characters over 30 length since 12.2, and Django supports versions 19c and higher.

I change this behavior through a monkey patch:

DatabaseOperations.max_name_length = lambda x: 128

I was wondering if the length could be specified in the config and the max_name_length function could be changed to use that setting, or default to 30 if not set?

I would like to contribute the change if possible.

Change History (1)

comment:1 Changed 3 months ago by Mariusz Felisiak

Resolution: duplicate
Status: newclosed

Duplicate of #30684.

Note: See TracTickets for help on using tickets.
Back to Top