# pgroll module arguments Generated from [the CLI catalog](../../lib/cli/catalog.json). Every export requires a fresh `runDir`. Common fields are `project` (default `.`), `executable` (the CLI program or path), `timeoutMs` (default `900000`), and `artifacts` is a comma-separated NAME=PATH string in the public component contract. ## `run` Execute any pgroll feature with literal CSV arguments. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `arguments` | `string (CSV)` | `` | Required | ## `version` Print the installed pgroll version. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | ## `init` Initialize pgroll state in the target database; no migration file is required. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `validate` Validate a migration file against the target database before application. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `file` | `string` | `` | Required | | `arguments` | `string (CSV)` | `` | Omitted | ## `start` Start a migration, backfill data, and optionally complete it. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `file` | `string` | `` | Required | | `backfillBatchDelay` | `string` | `--backfill-batch-delay=` | Omitted | | `backfillBatchSize` | `integer` | `--backfill-batch-size=` | Omitted | | `complete` | `boolean` | `--complete=` | Omitted | | `skipValidation` | `boolean` | `--skip-validation=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `complete` Complete the currently active migration in the database; no migration file is required. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `rollback` Roll back the currently active migration; completed migrations retain native rollback limitations. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `migrate` Apply outstanding migrations from a directory and propagate native failures. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `directory` | `string` | `` | Required | | `backfillBatchDelay` | `string` | `--backfill-batch-delay=` | Omitted | | `backfillBatchSize` | `integer` | `--backfill-batch-size=` | Omitted | | `complete` | `boolean` | `--complete=` | Omitted | | `expectOne` | `boolean` | `--expect-one=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `status` Report active migration and schema state in the target database. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `analyze` Analyze the target database SQL schema using the native hidden diagnostic command. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `baseline` Reset migration history to a baseline and write its placeholder file without a confirmation prompt. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `baselineVersion` | `string` | `` | Required | | `directory` | `string` | `` | Required | | `json` | `boolean` | `--json=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `pull` Pull missing migration history from the database into local files. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `directory` | `string` | `` | Required | | `json` | `boolean` | `--json=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `convert` Convert SQL statements from a file to a pgroll migration using native conversion rules. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `file` | `string` | `` | Required | | `json` | `boolean` | `--json=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `update` Rewrite outdated migration files in place; review changes before committing them. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `directory` | `string` | `` | Required | | `json` | `boolean` | `--json=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `create` Create an empty named migration file noninteractively in the working directory. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `name` | `string` | `--name=` | Required | | `json` | `boolean` | `--json=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `latest` Access native latest subcommands through the CSV arguments string. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `latest_migration` Print the latest migration from the target database or local migration directory. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `local` | `string` | `--local=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `latest_schema` Print the latest schema from the target database or local migration directory. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `local` | `string` | `--local=` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `latest_url` Print the latest connection URL with version schema search_path from the target database or local migration directory. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `postgresUrl` | `string` | `--postgres-url=` | Omitted | | `schema` | `string` | `--schema=` | Omitted | | `stateSchema` | `string` | `--pgroll-schema=` | Omitted | | `lockTimeout` | `integer` | `--lock-timeout=` | Omitted | | `role` | `string` | `--role=` | Omitted | | `useVersionSchema` | `boolean` | `--use-version-schema=` | Omitted | | `verbose` | `boolean` | `--verbose=` | Omitted | | `local` | `string` | `--local=` | Omitted | | `connectionString` | `string` | `` | Omitted | | `arguments` | `string (CSV)` | `` | Omitted | ## `completion` Generate shell completion scripts through literal native CSV arguments. | Field | Type | CLI argument | Default / required | | --- | --- | --- | --- | | `arguments` | `string (CSV)` | `` | Omitted |