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 中

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

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

  • meta
  • status
  • entryId
  • strapi
  • locale(仅适用于非本地化内容类型)
  • localizations
  • strapi_assignee
  • strapi_stage
  • then
  • document
  • 任何带有前缀 strapi_strapi__strapi 的东西

任何型号名称都可以加上前缀 strapi

🌐 Any model name can be prefixed with strapi.

在 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 的东西

模型名称不能strapi_strapi__strapi 为前缀。

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

迁移

🌐 Migration

手动操作

🌐 Manual procedure

在迁移之前,重命名任何属于限制列表的自定义字段或内容类型,以防止数据丢失或其他意外问题。

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