No results for ""
EXPAND ALL
  • Home
  • API docs

Creating migration flags

Read time: 3 minutes
Last edited: May 06, 2024

Overview

This topic explains how to create migration flags. Migration flags are temporary flags you can use to migrate data or tech systems without causing outages or downtime.

Migration flags can have two, four, or six stages. To learn more about when to use different types of migrations, read Performing multi-stage migrations with migration flags.

Not all SDKs support migration flags

Not all SDKs are compatible with migration flags. For a full list of compatible SDKs, read supported SDKs.

Creating a migration feature flag

Here's how to create a migration flag:

  1. Navigate to the flags list.
  2. Click Create flag. The "Create new flag" page appears.
  3. Enter a unique, human-readable Name.
  4. (Optional) Update the flag Key. You'll use this key to reference the flag in your code. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
  5. (Optional) Enter a Description of the flag. A brief, human-readable description helps your account members understand what the flag is for.
  6. (Optional) Update the Maintainer for the flag.
  7. (Optional) Check the Include flag in this project's release pipeline box. To learn more, read Release pipelines.
  8. (Optional) Choose any Metrics to monitor in the Metrics section. To learn more, read Metrics.
  9. Choose the Migration flag template in the Configuration section:
The "Configuration" panel of the flag creation page, with the "Migration" option selected.
The "Configuration" panel of the flag creation page, with the "Migration" option selected.
  1. Choose how many stages your migration will need. Use the descriptions to identify the migration type that best meets your needs.
The "Configuration" panel of the flag creation page, listing the three different migration options.
The "Configuration" panel of the flag creation page, listing the three different migration options.

a. If you choose a six-stage migration, select a context kind from the Targeting dropdown.

Migrations with six stages require a context kind

You must choose a context kind to create a six-stage migration. The context kind you choose should indicate how the migrated data is partitioned. It determines how rollouts are bucketed and which context kind to reference when you create cohorts.

You cannot update default on and off variations for migration flags

A migration flag's default variation is always off. This ensures that migrations always begin in the correct stage.

  1. (Optional) In the "Additional configuration" panel, update optional additional settings:
    • Choose one or more tags from the Tags menu.
    • Disregard the SDKs using Mobile Key and/or SDKs using client-side ID boxes. Migration flags are only available for server-side SDKs.
Tags let you sort flags into groups

Tags are useful for managing flag permissions using custom roles. For example, you can tag a flag as "Marketing" and "DevOps," and then use these tags to determine who has read or write access for the flag. To learn more, read Custom roles.

  1. Click Create flag.

This procedure explains how to create a migration flag, but targeting and rolling them out is more complex. We recommend you also read Targeting with migration flags.