Skip to content

CLI

3.3.0

Added

  • Init options. The init command now accepts --provider (postgres, sqlite, sqlserver) and --backend (file, s3) options to scaffold configuration for a specific provider/backend combination.
  • S3-compatible state stores. The BACKEND s3 block accepts a force_path_style attribute for S3-compatible stores (such as MinIO) that require path-style addressing. The endpoint, region, and credentials continue to come from the ambient AWS configuration (AWS_ENDPOINT_URL_S3, AWS_REGION, and the credential chain).
  • Updated to NSchema.Core 3.3.0 and the latest provider packages.

Fixed

  • destroy now tears down SQL Server and SQLite projects. Teardown previously failed for these providers because SQL Server’s DROP SCHEMA does not cascade, and SQLite cannot drop its implicit main schema. The migration engine now drops a schema’s contained objects before the schema itself.
  • DDL formatting (fmt). Fixed two formatting bugs: comments following the last attribute in a block were flattened onto a single line, and a blank line between a leading comment and its statement was removed.

3.2.0

Added

  • Short option aliases. Common flags now have single-character forms: -C (--directory), -e (--environment), -v (--verbose), -q (--quiet), -s (--scope), -y (--auto-approve), -f (--force), -o (--out / --out-dir), and -p (--plan-file).
  • Tab-completion for environment names. --environment <TAB> now completes the environment names discovered from the project’s *.env.<name>.sql files.

3.1.0

Added

  • SQLite Support. Use:
    PROVIDER sqlite (
    connection_string = 'Data Source=app.db'
    )
    Connection string may also be supplied separately via the NSCHEMA_SQLITE_CONNECTION_STRING environment variable.
  • SQL Server Support. Use:
    PROVIDER sqlserver (
    connection_string = 'Server=localhost;Database=app'
    )
    Credentials and command timeout may also be supplied separately, via the username / password /command_timeout block attributes or the NSCHEMA_SQLSERVER_CONNECTION_STRING / NSCHEMA_SQLSERVER_USERNAME / NSCHEMA_SQLSERVER_PASSWORD environment variables.

3.0.0

Initial release of the NSchema CLI. dotnet tool install -g nschema

See https://nschema.dev for full documentation.