Migrating the Legacy cms to Model Field Mapping
Theoretically speaking, if the basic data types corresponding to the fields in the legacy cms and the data model are the same, data migration can be performed and then used flexibly based on one's needs; in the following table, "Whether Compatible with Legacy Data" indicates whether this type of field in the data model can be directly mapped without additional conversion.
The recommended mapping data model subtypes primarily refer to the types suggested during migration. If there is no burden of historical data, you can refer to the design as needed. For example, the enumeration type of cms can be directly replaced by the enumeration type in the data model; resource types such as files, images, and multimedia in http format can be directly mapped to the same type of data model resources.
cms field | cms field subtype | Basic Data Type | Recommended Data Model Type | Recommended Data Model Subtype | Legacy Data Compatibility | Cross-Environment Migration Support |
---|---|---|---|---|---|---|
Single-line string | - | string | Text | Single-line text | ✔️ | ✔️ |
Multi-line string | - | string | Multi-line text | ✔️ | ✔️ | |
Number | - | number | Number | - | ✔️ | ✔️ |
Boolean | - | boolean | Boolean | - | ✔️ | ✔️ |
Enum | String enum | string | Text | Single-line text | ✔️ | ✔️ |
Numeric enum | number | Number | - | ✔️ | ✔️ | |
Date | Unix Timestamp ms | number | Date Time | Date | ✔️ | ✔️ |
Unix Timestamp s | number | Number | - | ✔️ | ✔️ | |
Date Object | - | - | - | ❌ | ❌ | |
Time string | string | Text | Single-line text | ✔️ | ✔️ | |
Date and Time | Unix Timestamp ms | number | Date Time | Date Time | ✔️ | ✔️ |
Unix Timestamp s | number | Number | - | ✔️ | ✔️ | |
Date Object | - | - | - | ❌ | ❌ | |
Time string | string | Text | Single-line text | ✔️ | ✔️ | |
File - Multiple not allowed | field | string | File | - | ✔️ | ❌ |
http | string | Text | Single-line text | ✔️ | ❌ | |
File - Multiple allowed | field | string[] | Array | File | ✔️ | ❌ |
http | string[] | Array | Text | Single-line text | ✔️ | ❌ | |
Image - Multiple not allowed | field | string | Image | - | ✔️ | ❌ |
http | string | Text | Single-line text | ✔️ | ❌ | |
Image - Multiple allowed | field | string[] | Array | Image | ✔️ | ❌ |
http | string[] | Array | Text | Single-line text | ✔️ | ❌ | |
Multimedia - Multiple not allowed | field | string | Multimedia | - | ✔️ | ❌ |
http | string | Text | Single-line text | ✔️ | ❌ | |
Multimedia - Multiple allowed | field | string[] | Array | Multimedia | ✔️ | ❌ |
http | string[] | Array | Text | Single-line text | ✔️ | ❌ | |
Email Address | - | string | - | ✔️ | ✔️ | |
Phone Number | - | string | Phone | Mobile Number/Landline | ✔️ | ✔️ |
URL | - | string | URL | - | ✔️ | ✔️ |
Rich Text | - | string | Rich Text | - | ✔️ | ✔️ |
Markdown | - | string | Markdown | - | ✔️ | ✔️ |
Association | No Multiple Associations | string | Association (New) | One-to-One | ❌ | ❌ |
Multiple Associations | string | Association (New) | One-to-Many | ❌ | ❌ | |
Array | - | string[] | Array | Text | Single-line text | ✔️ | ✔️ |
Json Object | - | string | Object | - | ✔️ | ✔️ |