Using the latest v1.2.0-beta.1 cli and server, the command hasura migrate create "init" --from-server doesn't store metadata files.
Steps to reproduce:
hasura init --directory hasura --endpoint http://localhost:8080hasura migrate create "init" --from-serverIt creates an SQL migration script as expected in the migration folder. But the files under metada are not touched. for example, tables.yam contains only [].
Am I missing something ?
@EmrysMyrddin The new workflow introduced with 1.2.0-beta.1 moves all metadata related actions under metadata command. migrate command is exclusively used for managing SQL migrations.
To export both SQL schema and Hasura metadata, you should execute the following commands:
hasura migrate create init --from-server
hasura metadata export
We'll be adding proper docs for this soon.
Great ! It's working now with v1.2.0-beta.2.
While this is ok for setting up migrations for existing instance, it could be handy to have a single commande to apply both sql and metadata migrations.
Anyway, thanks for your work !
@EmrysMyrddin glad to here it's working now. I'm closing this issue 馃檪
Most helpful comment
@EmrysMyrddin The new workflow introduced with 1.2.0-beta.1 moves all metadata related actions under
metadatacommand.migratecommand is exclusively used for managing SQL migrations.To export both SQL schema and Hasura metadata, you should execute the following commands:
We'll be adding proper docs for this soon.