Skip to main content

Database identifiers shortened in v5

In Strapi v5, database identifiers can't be longer than 53 characters.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi v5.

Breaking change description

In Strapi v4

Database identifiers could be longer than 53 characters, potentially causing issues with some databases.

In Strapi v5

Database identifiers can't be longer than 53 characters and will be shortened.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

  • A hashing key will be added when shortening database identifiers to avoid conflicts. It will consist in the first 6 characters of SHA-256. For example, my_very_very_very_very_very_very_very_too_long_identifier_unique will be shortened to my_very_very_very_very_very_very_very_very_06a6ab_unq in Strapi v5.

  • Some suffixes will be used:

    SuffixShort version
    fkfk
    uniqueunq
    primarypk
    indexidx
    componentcmp
    componentscmps
    component_type_indexcmpix
    entity_fketfk
    field_indexflix
    orderord
    order_fkofk
    order_inv_fkoifk
    order_indexoidx
    inv_fkifk
    morphsmph
    linkslnk
    id_column_indexidix

Manual procedure

No manual migration is required. Strapi will handle everything when starting the application in Strapi v5.