mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
57 lines
1.7 KiB
ReStructuredText
57 lines
1.7 KiB
ReStructuredText
.. _hasura_migrate_create:
|
|
|
|
Hasura CLI: hasura migrate create
|
|
---------------------------------
|
|
|
|
Create files required for a migration.
|
|
|
|
Synopsis
|
|
~~~~~~~~
|
|
|
|
|
|
Create ``sql`` and ``yaml`` files required for a migration.
|
|
|
|
::
|
|
|
|
hasura migrate create [migration-name] [flags]
|
|
|
|
Examples
|
|
~~~~~~~~
|
|
|
|
::
|
|
|
|
# Set up migration files for the first time by introspecting a server:
|
|
hasura migrate create "init" --from-server
|
|
|
|
Options
|
|
~~~~~~~
|
|
|
|
::
|
|
|
|
--admin-secret string admin secret for Hasura GraphQL engine
|
|
--endpoint string http(s) endpoint for Hasura GraphQL engine
|
|
--from-server get SQL statements and Hasura metadata from the server
|
|
-h, --help help for create
|
|
--metadata-from-file string path to a hasura metadata file to be used for up actions
|
|
--metadata-from-server take metadata from the server and write it as an up migration file
|
|
--schema stringArray name of Postgres schema to export as a migration (default [public])
|
|
--sql-from-file string path to an SQL file which contains the SQL statements
|
|
--sql-from-server take pg_dump from the server and save it as a migration
|
|
|
|
Options inherited from parent commands
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
::
|
|
|
|
--log-level string log level (DEBUG, INFO, WARN, ERROR, FATAL) (default "INFO")
|
|
--no-color do not colorize output (default: false)
|
|
--project string directory where commands are executed (default: current dir)
|
|
--skip-update-check Skip automatic update check on command execution
|
|
|
|
SEE ALSO
|
|
~~~~~~~~
|
|
|
|
* :ref:`hasura migrate <hasura_migrate>` - Manage migrations on the database
|
|
|
|
*Auto generated by spf13/cobra*
|