# Migrations

# Introduction

Rocket CLI utilizes contentful-migration to provide the ability to migrate a set of pre-built content types

During the rocket ignite and contentful add process, there is an option to select which of the recommended content types to migrate to your space. Some types have dependencies on each other. Unless a selection is made that is incompatible with these dependencies, the migration cannot be performed. We recommend migrating all recommended content types.

For more information about content types, see this Contentful documentation.

# Recommend content types

The diagram below provides an overview of the recommended content types and their relationships:

flowchart TD
    Page --> Metadata
    Page --> PageSection

    ImageTextLinkElement --> Image
    ImageTextLinkElement --> Link

    PageSection --> Image
    PageSection --> ImageTextLinkElement
    PageSection --> RichText
    PageSection --> Button
    PageSection --> TechnicalElement

    NavElement --> NavElement

    Button

    SiteSettings

    Footer

# Page

Key Type unique required
internal Symbol true true
title Symbol false true
slug Symbol true true
metadata Metadata false false
content PageSection[] false false

# Metadata

The Metadata is used to set meta data of a page.

Key Type unique required
internal Symbol true true
title Symbol false true
description Text false true
keywords Symbol[] false false
noIndex Boolean false true
noFollow Boolean false true

# PageSection

The PageSection is used to structure the page.

Key Type unique required
internal Symbol true true
columnCount Number (min: 1, max: 3) false true
backgroundColor Symbol false true
sectionItems Items[] * true false

* Items: ImageTextLinkElement; Technical Element; Image; RichText; Button

# ImageTextLinkElement

The ImageTextLinkElement is used to group an image, title, text and link.

Key Type unique required
internal Symbol true true
title Symbol false false
image Image false true
text Text false true
link Link false false

# Technical Element

The Technical Element is used to include a reference to a frontend component in a page section.

Key Type unique required
internal Symbol true true
component Symbol false true
configuration JSON false true

# Image

Key Type unique required
internal Symbol true true
image Link(Asset) false true
altText Symbol false true

# RichText

Key Type unique required
internal Symbol true true
content Text false true

# Button

Key Type unique required
internal Symbol true true
type * Symbol false true
label Symbol false true
externalLink * Symbol false false
internalLink * Page false false
target * Boolean false false

* type: "primary" | "secondary".
* externalLink: link to an external url.
* internallLink: link to an internal page.
* target: opens link in a new tab.

# Link

Key Type unique required
internal Symbol true true
label Symbol false true
externalLink * Symbol false false
internalLink * Page false false
target * Boolean false false

* externalLink: link to an external url.
* internallLink: link to an internal page.
* target: opens link in a new tab.

# SiteSettings

SiteSettings is used to to set global settings.

Key Type unique required
internal Symbol true true
logo Link(Asset) false true
titleSuffix Symbol false true

# NavElement

Key Type unique required
internal Symbol true true
label Symbol false true
pageReference Page false false
subNav NavElement[] false false

# Footer

Key Type unique required
internal Symbol true true
footerText RichText false true

# How to structure a page?

The structure below shows an example of how a page can be structured with the recommended content types.

Page

PageSection (columnCount = 1)

Image
RichText
TechnicalElement

PageSection (columnCount = 3)

ImageTextLinkElement
ImageTextLinkElement
ImageTextLinkElement
RichText
RichText
Image