Skip to main content

某些属性和内容类型名称是保留的

¥Some attributes and content types names are reserved

在 Strapi 5 中,一些属性和内容类型名称是保留的,在迁移到 Strapi 5 之前,应重命名 Strapi v4 中使用这些保留名称的所有字段或内容类型,以防止数据丢失。

¥In Strapi 5, some attributes and content types names are reserved, and all fields or content types in Strapi v4 using these reserved names should be renamed before migrating to Strapi 5 to prevent data loss.

此页面是 重大变更数据库 的一部分,提供有关重大更改的信息以及从 Strapi v4 迁移到 Strapi 5 的其他说明。

¥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 5.

 Is this breaking change affecting plugins?Yes
 Is this breaking change automatically handled by a codemod?No

重大更改描述

¥Breaking change description

在 Strapi v4 中

¥In Strapi v4

可以在内容类型上创建以下属性名称:

¥The following attribute names can be created on a content type:

  • meta

  • status

  • entryId

  • strapi

  • locale(仅适用于非本地化内容类型)

    ¥locale (only for non-localized content types)

  • localizations

  • strapi_assignee

  • strapi_stage

  • then

  • document

  • 任何带有前缀 strapi_strapi__strapi 的内容

    ¥anything with the prefix strapi, _strapi, or __strapi

任何模型名称都可以以 strapi 为前缀。

¥Any model name can be prefixed with strapi.

在 Strapi 5 中

¥In Strapi 5

以下属性名称不能在内容类型上创建:

¥The following attribute names can not be created on a content type:

  • meta

  • status

  • entryId

  • strapi

  • locale

  • localizations

  • strapi_assignee

  • strapi_stage

  • then

  • document

  • 任何带有前缀 strapi_strapi__strapi 的内容

    ¥anything with the prefix strapi, _strapi, or __strapi

模型名称不能以 strapi_strapi__strapi 作为前缀。

¥Model names can not be prefixed with strapi, _strapi, or __strapi.

迁移

¥Migration

手动程序

¥Manual procedure

将 重命名为 ,并在其前面添加 ,使其成为正确的 URL。

¥Rename any custom field or content-type that falls under the restriction list before any migration to prevent data loss or other unexpected issues.