You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
I have just hit an issue that bites me occasionally where I need to explicitly set the db_table attribute of M2M fields in ICEkit to reasonable-length strings. Without this attribute, DB migrations seem to create relationship tables with invalid/missing FK constraints in PostgreSQL which will then fail in use.
This issue seems related to django-fluent/django-fluent-pages#103 where the 63-character limit of PostgreSQL table/constraint/relation names was exceeded due to Fluent prepending text to db_table attributes.
In this case the missing relation name is limited to 63 characters, but is different from the name created in the DB.
Example error:
relation "advancedeventlisting_advancedeventlistingpage_limit_to_prim561a" does not exist
LINE 1: ...istingpage_limit_to_prim561a"."eventtype_id" FROM "advancede...
Example DB table that actually exists in DB (note the extra pagetype_ at the start):
The problem is likely due to the db_table name being derived in two different ways, one without the pagetype_ prefix when generating DB creation queries, and another with that prefix when creating the actual DB tables.