short answer is it’s a bug we are aware of, can’t fix in the v4 lifecycle, intend on fixing it in v5
There are some workarounds you can do to fix it per content-type/component without losing data but it does require some work. Info is in this bug report:
opened 01:15AM - 13 Apr 22 UTC
issue: bug
severity: critical
status: confirmed
source: core:database
flag: tracking issue
flag: EE
## Bug report
### Describe the bug
This is a tracking issue for the variou… s issues regarding lengths in the database being too long:
- `Error: ER_TOO_LONG_IDENT: Identifier name` - Foreign Keys:
- https://github.com/strapi/strapi/issues/12339
- https://github.com/strapi/strapi/issues/13014
- `error: create index` - Index Names:
- https://github.com/strapi/strapi/issues/13031
- `Error: ER_TOO_LONG_IDENT: Identifier name` - Components
- https://github.com/strapi/strapi/issues/12101
- https://github.com/strapi/strapi/issues/13116
We need to handle length constraints more gracefully across the entire database layer, maybe utilize short-codes like `comp`, ect.
### Steps to reproduce the behavior
See various linked issues
### Expected behavior
Each database should have properly length controlled tables, columns, indexes, and foreign keys
### Additional context
Additional duplicate issues will be linked in the comments below: