Creating migration flags
Read time: 3 minutes
Last edited: Aug 23, 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 are compatible with migration flags. For a full list of compatible SDKs, read supported SDKs.
Create migration flags
Here's how to create a migration flag:
- Navigate to the Flags list.
- Click Create flag. The "Create new flag" page appears.
- Enter a unique, human-readable Name.
- (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.
- (Optional) Enter a Description of the flag. A brief, human-readable description helps your account members understand what the flag is for.
- (Optional) Update the Maintainer for the flag.
- (Optional) Check the Include flag in this project's release pipeline box. To learn more, read Release pipelines.
- (Optional) Choose any Metrics to monitor in the Metrics section. To learn more, read Metrics.
- Choose the Migration flag template in the Configuration section:
![The "Configuration" panel of the flag creation page, with the "Migration" option selected.](/static/1725648931859.4363522678/6af66/flag-migration-creation.auto.png)
- 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.](/static/1725648931859.4363522679/6af66/flag-migration-stages.auto.png)
a. If you choose a six-stage migration, select a context kind from the Targeting dropdown.
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.
A migration flag's default variation is always off
. This ensures that migrations always begin in the correct stage.
- (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 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.
- 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.
Modify the migration flag template
To modify your migration flag template:
- Click the project dropdown. The project menu appears:
![The project menu.](/static/1725648931891.4368522768/604ec/project-menu-dropdown-new-shell.auto.png)
- Select Project settings.
- Select Flags. The Flags settings list appears.
- In the "Flag templates section, click pencil icon next to "Migration."
- In the "Tags" section, type to add tags to each new flag by default.
- Click Save.
Verify that the updated default template settings are correct by navigating to the Flags list and creating a new migration flag.