Bug : Identifier name is too long when creating relation between tables
Discussed in https://github.com/nocodb/nocodb/discussions/8691
Originally posted by eugeneihde June 11, 2024
I want to create a relation between to tables in nocodb. So i got into the table and created a new field with the field type Links. I selected the Has Many Relationship and selected the table i wanted to link to. Now when i tried to save i got this error message:
alter table
nc_v76b___StrassenanschriftInlandadd indexnc_v76b___strassenanschriftinland_nc_v76b___codeartanschrift_id10_index(nc_v76b___CodeArtAnschrift_id10) - Identifier name 'nc_v76b___strassenanschriftinland_nc_v76b___codeartanschrift_id10_index' is too long
Is there a way to fix this?
As of now there isnt a work around for this I guess? Its my first "base" with my first 2 tables and a lookup field and I am stuck immediately for what ever comes next ...
@joeldebruijn Our workaround was to temporarily shorten the names of the two tables before establishing the relation. After the relation was created, we renamed the tables back to their original names.
For example one table was named StrassenAnschriftInland and we temporarily shortened it to StrAnschInland.
Oh that would be great and minimal workaround, will test!
Thanks for bringing this up! The issue was related to index creation, and we’ve addressed it by specifying a custom index name. This should resolve the problem.
You can try out the following PR build to verify the fix:
docker run -d -p 8888:8080 nocodb/nocodb-timely:0.262.0-pr-10632-20250225-1235