After you publish a Spell, you may want to make edits later. After publishing a few versions, you may also want to revert the Spell to an older state. Spell versions help you with both of these cases.

Spell Versions Overview

When you are creating a new Spell, you won’t see anything about Spell versions in the editor. This is because there’s only one version - the initial draft.

Once you publish your Spell, your draft version becomes a published version. If you enter the editor again, you’ll find the Spell versions selector next to the Spell name:

Spell version selector in the editor

Clicking the selector will show a dropdown of all of your Spell versions. In this case, there is the live published version (v2) and a draft. Whenever you are in the editor, you are viewing a draft version of your Spell; you’ll never be editing a published version, as it’s locked in its state and cannot be modified.

If you update the Spell and enter the editor again, you’ll now have 3 versions: a draft (the one you’re editing), the live published version, and the old published version.

Spell version selector in the editor

Two important concepts to keep in mind:

  1. Published versions can never be modified or deleted
  2. Spells can only have one draft version

Restoring A Version

Let’s say you want to restore the first published version from the Spell above. How do we do that?

If you select a version from the version selector dropdown, the current draft will be overwritten with that published version’s Spell state. Then, you simply need to update the spell to turn your draft into a published version.

Keep in mind that if you’ve made edits to your draft from the latest published version and you overwrite it with an old version, you will lose your changes!