Upgrading to Hasura migrations config v2¶
Table of contents
What has changed?¶
In config v1, the PG schema migrations and Hasura metadata were both handled
using the same migration files which were in
yaml
format. In config v2, these are managed separately in their own
directories in the Hasura project. Metadata is managed in its separate
metadata directory and PG schema migrations are
managed via migration files that are now in
SQL
format.
Changes needed in existing workflows¶
Due to the above mentioned changes, any workflows that involve applying migrations have an additional step of applying metadata as well.
For example,
- any place where the
hasura migrate apply
command is used, it now needs to be followed by ahasura metadata apply
command. - if the
cli-migrations
Docker image is used for auto applying migrations at server start, now you will have to use thecli-migrations-v2
image and the/metadata
directory will also have to be mounted along with the/migrations
directory
Was this page helpful?
Thank you for your feedback!
Stay up to date with product & security news
See past editions