I am committing some .fsl
files to a repo, and deploying them automatically via github actions CI on any push.
My question is about developing + schema files. If I make a change to the schema definition, the CI logs an error, as below. I don’t understand how to have a good development workflow. The schema should change as part of developing; I don’t really want an “add
migration”, because it will be unnecessary in production; the schema is just changing for development purposes.
Is it possible to change a schema (add a field) without adding a migration field?
Run npx fauna schema push --dir=fauna --no-input --secret=***
› Error: error: Field `.metadata` is not present in the live schema
› at read-token.fsl:5:5
› |
› 5 | metadata: {
› | ^^^^^^^^
› |
› hint: Provide an `add` migration for this field
› |
› 5 | migrations {
› | _____+
› 6 | | add .metadata
› 7 | | backfill .metadata = <expr>
› 8 | | }
› | |____^
› |
› hint: Add a default value to this field
› at read-token.fsl:9:6
› |
› 9 | } = <expr>
› | +++++++++
› |
› hint: Make the field nullable
› at read-token.fsl:9:6
› |
› 9 | }?
› | +
› |
Error: Process completed with exit code 1.