Skip to main content
Version: v2.x

Hasura CLI: hasura scripts update-project-v2

Update the Hasura project from config v1 to v2.

Synopsis

Update the Hasura project from config v1 to v2 by executing the following actions:

  1. Installs a plugin system for CLI
  2. Installs CLI Extensions plugins (primarily for actions)
  3. Takes a back up of migrations directory
  4. Removes all metadata yaml migrations and converts everything to SQL
  5. Exports the metadata from server in the new format (multiple files in a directory)
  6. Re-write the config.yaml file to new format
hasura scripts update-project-v2 [flags]

Alias: update-config-v2

Examples

# Read more about v2 configuration for CLI at https://docs.hasura.io

# Update the Hasura project from config v1 to v2
hasura scripts update-project-v2

# Update the Hasura project from config v1 to v2 with a different metadata directory:
hasura scripts update-project-v2 --metadata-dir "metadata"

Options

    --admin-secret string            admin secret for Hasura GraphQL engine (env "HASURA_GRAPHQL_ADMIN_SECRET")
--certificate-authority string path to a cert file for the certificate authority (env "HASURA_GRAPHQL_CERTIFICATE_AUTHORITY")
--endpoint string http(s) endpoint for Hasura GraphQL engine (env "HASURA_GRAPHQL_ENDPOINT")
-h, --help help for update-project-v2
--insecure-skip-tls-verify skip TLS verification and disable cert checking (default: false) (env "HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY")
--metadata-dir string (default "metadata")

Options inherited from parent commands

--envfile string      .env filename to load ENV vars from (default ".env")
--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

Auto generated by spf13/cobra