Allow staging schema delete and rename

,

Add to the CLI error message what to do instead of only throwing the error:

Got this error message:

 ›   Error: Failed to delete Function `signInOrSignUpWithSocialProvider`.
 ›   constraint failures:
 ›     Cannot delete a Function when schema is staged

e.g. “Cannot delete a Function when schema is staged. To delete a Function run fauna schema push --active.”


Still this situation creates problem. If I have also index changes, I would like to profite from the benefits of staging, but at the same time I can’t use it because the schema change includes a deletion. So either it would be nice if you could handle deletions also as part of staging or having an option to first stage the first part of the files and then push the deletions directly.

Hi @Mike!

Allowing staging of schema deletion and renames is on our roadmap. There are some technical reasons why we cannot allow it yet. We’ve started the work, but still more to do. I can’t offer a timeline at this moment.

Improving CLI errors and recommendations is something we are working on with an upcoming major release of the CLI, so I will forward this on to see if there is something we can do for this out of the gate.

I’m going to rename this topic to focus on staging deletions and renaming. But let’s come back to the CLI output once the major release of the CLI is out.

1 Like