Add the ability to rename an environment

This relates to a feature request we added: Allow migrations to be applied directly to the primary environment - #2 by donnie.hale

We just realized that the requirement to fork the Primary environment in order to apply migrations means that the new Primary environment, after the fork has been promoted, will have a different name than the original Primary environment.

In our case, the Primary environment was named “main”. Now it’s named “primary-2023-10-19”.

This implies that we have to change the value we’re passing in the X-Environment header every time we go through one of these “fork - apply migrations - promote” cycles.

Further, it looks like there’s no way to rename an environment so that we can preserve the name we pass in the X-Environment header. Are we missing something? Is there a way to rename an environment?

The value we pass for X-Environment is a config setting in our deployed (to Azure) application. We can’t be required to change that every time we make content changes that don’t correspondingly require application changes.

Any help would be appreciated. Thanks.

Hello @donnie.hale

This is not possible at the moment unfortunately, but I do see how it would be a nice addition, so I changed this topic into a feature request

+1 on this request, we have to change config settings every time we update environments and its a huge bottleneck.

Our alternative for this is to not provide a X-Environment header in production, since it defaults to primary. In staging and uat, we usually fork the current staging to staging-backup, delete staging, fork new staging to staging and so on. It creates downtime in staging/uat but thats what sacrifice.

1 Like

This feature was released in April 2024! (We forgot to note it here, sorry)