Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
boolean
Create version schemas for each migration
boolean
Enable verbose logging
string
Organization ID
string
Project ID
string
Branch ID or name
string
Database name on the branch
boolean
Output migration file in JSON format instead of YAML
string
The profile to use
boolean
Print where each resolved value came from
string
required
The migration file to convert
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Xata","colors":{"primary":"#735adc","light":"#735adc","dark":"#735adc"},"logo":{"light":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/light.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=4ef098482078f4153c39dc17dd26476b","dark":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/dark.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=906164890c462dfd9eb1d334f76aa98d"},"favicon":"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/favicon.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=d86bc351b43f47f5187c041a7cb5539a","api":{},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://xata.io/contact-support","label":"Support"},{"href":"https://www.xatastatus.com/","label":"Status"},{"href":"https://github.com/xataio","label":"GitHub"}],"primary":{"type":"button","label":"Xata Console","href":"https://console.xata.io/"}},"footer":{"socials":{"x":"https://twitter.com/xata","linkedin":"https://www.linkedin.com/company/xataio","github":"https://github.com/xataio","discord":"https://xata.io/discord","youtube":"https://www.youtube.com/@xataio"}},"fonts":{"family":"Geist"},"icons":{"library":"fontawesome"},"integrations":{"gtm":{"tagId":"GTM-PMD75RM"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"xata","hasAudioNarration":false,"actualSubdomain":"xata","customDomains":["xata.io"],"gitSource":{"type":"github","owner":"xataio","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af7444c2ff8ee22315260f4","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Guides","count":60},{"language":"default","tag":"API Reference","count":51},{"language":"default","tag":"Endpoints","count":51},{"language":"default","tag":"Open Source","count":34},{"language":"default","tag":"pgstream","count":34},{"language":"default","tag":"Organizations","count":22},{"language":"default","tag":"CLI Reference","count":19},{"language":"default","tag":"Manage","count":17},{"language":"default","tag":"Release Notes","count":15},{"language":"default","tag":"AI Agents","count":10}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@xata.io"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#navigation-items li[id=\"/overview\"]>button[aria-controls]>div:last-child{display:none}"}],"page":{"pagePath":"cli/roll","slug":"/cli/roll","pageMetadata":{"title":"roll","description":"Run pgroll to manage PostgreSQL schema migrations","href":"/cli/roll"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run pgroll to manage PostgreSQL schema migrations\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`The pgroll binary version is pinned by the CLI and can be overridden with the `,_jsx(_components.code,{children:`XATA_PGROLL_BINARY_VERSION`}),` environment variable.`]})}),`\n`,_jsxs(_components.p,{children:[`Every command below also takes `,_jsx(_components.code,{children:`-h, --help`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#baseline`,children:_jsx(_components.code,{children:`xata roll baseline`})}),` — Create a baseline migration for an existing database schema`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#complete`,children:_jsx(_components.code,{children:`xata roll complete`})}),` — Complete an ongoing migration with the operations present in the given file`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#init`,children:_jsx(_components.code,{children:`xata roll init`})}),` — Initialize pgroll in the target database`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#latest`,children:_jsx(_components.code,{children:`xata roll latest`})}),` — Print the name of the latest schema version or migration`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#latest-migration`,children:_jsx(_components.code,{children:`xata roll latest migration`})}),` — Print the latest migration name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#latest-schema`,children:_jsx(_components.code,{children:`xata roll latest schema`})}),` — Print the latest version schema name`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#migrate`,children:_jsx(_components.code,{children:`xata roll migrate`})}),` — Apply outstanding migrations from a directory to a database`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#update`,children:_jsx(_components.code,{children:`xata roll update`})}),` — Update outdated migrations in a directory`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#pull`,children:_jsx(_components.code,{children:`xata roll pull`})}),` — Pull migration history from the target database and write it to disk`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#rollback`,children:_jsx(_components.code,{children:`xata roll rollback`})}),` — Roll back an ongoing migration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#start`,children:_jsx(_components.code,{children:`xata roll start`})}),` — Start a migration for the operations present in the given file`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#status`,children:_jsx(_components.code,{children:`xata roll status`})}),` — Show pgroll status`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`#convert`,children:_jsx(_components.code,{children:`xata roll convert`})}),` — Convert SQL statements to a pgroll migration`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`baseline`,children:`baseline`}),`\n`,_jsx(_components.p,{children:`Create a baseline migration for an existing database schema`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` baseline`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--json] [--yes] [--profile value] [--debug] [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`folder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json`,children:_jsx(_components.p,{children:`Output in JSON format instead of YAML`})}),`\n`,_jsx(ParamField,{path:`--yes`,type:`boolean`,id:`param-yes`,children:_jsx(_components.p,{children:`Skip confirmation prompt`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`version`,type:`string`,id:`param-version`,children:_jsx(_components.p,{children:`Version name for the baseline, for example 01_initial_schema`})}),`\n`,_jsx(ParamField,{path:`folder`,type:`string`,id:`param-folder`,children:_jsx(_components.p,{children:`The directory that contains the migrations`})}),`\n`,_jsx(Heading,{level:`2`,id:`complete`,children:`complete`}),`\n`,_jsx(_components.p,{children:`Complete an ongoing migration with the operations present in the given file`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` complete`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-1`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-1`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-1`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-1`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-1`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-1`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-1`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-1`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-1`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-1`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-1`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-1`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-1`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-1`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`2`,id:`init`,children:`init`}),`\n`,_jsx(_components.p,{children:`Initialize pgroll in the target database`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-2`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-2`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-2`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-2`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-2`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-2`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-2`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-2`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-2`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-2`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-2`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-2`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-2`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-2`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`2`,id:`latest`,children:`latest`}),`\n`,_jsx(_components.p,{children:`Print the name of the latest schema version or migration`}),`\n`,_jsx(Heading,{level:`3`,id:`latest-migration`,children:`latest migration`}),`\n`,_jsx(_components.p,{children:`Print the latest migration name`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` latest`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` migration`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--local value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-3`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-3`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-3`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-3`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-3`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-3`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-3`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-3`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-3`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-3`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-3`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--local`,type:`string`,id:`param-local`,children:_jsx(_components.p,{children:`Retrieve the latest migration from a local migration directory`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-3`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-3`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-3`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`3`,id:`latest-schema`,children:`latest schema`}),`\n`,_jsx(_components.p,{children:`Print the latest version schema name`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` latest`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--local value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-4`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-4`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-4`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-4`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-4`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-4`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-4`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-4`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-4`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-4`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-4`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--local`,type:`string`,id:`param-local-1`,children:_jsx(_components.p,{children:`Retrieve the latest version from a local migration directory`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-4`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-4`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-4`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`2`,id:`migrate`,children:`migrate`}),`\n`,_jsx(_components.p,{children:`Apply outstanding migrations from a directory to a database`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` migrate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--backfill-batch-delay value] [--backfill-batch-size value] [--complete] [--expect-one] [--profile value] [--debug] [--json] [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`folder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-5`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-5`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-5`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-5`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-5`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-5`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-5`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-5`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-5`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-5`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-5`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--backfill-batch-delay`,type:`string`,id:`param-backfill-batch-delay`,children:_jsx(_components.p,{children:`Duration of delay between batch backfills (eg. 1s, 1000ms)`})}),`\n`,_jsx(ParamField,{path:`--backfill-batch-size`,type:`string`,id:`param-backfill-batch-size`,children:_jsx(_components.p,{children:`Number of rows backfilled in each batch`})}),`\n`,_jsx(ParamField,{path:`--complete`,type:`boolean`,id:`param-complete`,children:_jsx(_components.p,{children:`Complete the final migration rather than leaving it active`})}),`\n`,_jsx(ParamField,{path:`--expect-one`,type:`boolean`,id:`param-expect-one`,children:_jsx(_components.p,{children:`Abort if there is more than one migration to be applied`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-5`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-5`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-5`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(ParamField,{path:`folder`,type:`string`,id:`param-folder-1`,children:_jsx(_components.p,{children:`The directory that contains the migrations`})}),`\n`,_jsx(Heading,{level:`2`,id:`update`,children:`update`}),`\n`,_jsx(_components.p,{children:`Update outdated migrations in a directory`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--json] [--profile value] [--debug] [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`folder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-6`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-6`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-6`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-6`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-6`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-6`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-6`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-6`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-6`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-6`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-6`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-6`,children:_jsx(_components.p,{children:`Output migration file in JSON format instead of YAML`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-6`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-6`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`folder`,type:`string`,id:`param-folder-2`,children:_jsx(_components.p,{children:`The directory that contains the migrations`})}),`\n`,_jsx(Heading,{level:`2`,id:`pull`,children:`pull`}),`\n`,_jsx(_components.p,{children:`Pull migration history from the target database and write it to disk`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pull`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--json] [--profile value] [--debug] [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`folder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-7`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-7`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-7`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-7`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-7`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-7`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-7`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-7`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-7`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-7`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-7`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-7`,children:_jsx(_components.p,{children:`Output each migration in JSON format instead of YAML`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-7`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-7`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`folder`,type:`string`,id:`param-folder-3`,children:_jsx(_components.p,{children:`The target directory to pull migrations into`})}),`\n`,_jsx(Heading,{level:`2`,id:`rollback`,children:`rollback`}),`\n`,_jsx(_components.p,{children:`Roll back an ongoing migration`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rollback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-8`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-8`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-8`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-8`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-8`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-8`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-8`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-8`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-8`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-8`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-8`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-8`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-8`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-8`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`2`,id:`start`,children:`start`}),`\n`,_jsx(_components.p,{children:`Start a migration for the operations present in the given file`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--backfill-batch-delay value] [--backfill-batch-size value] [--complete] [--skip-validation] [--profile value] [--debug] [--json] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`file`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-9`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-9`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-9`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-9`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-9`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-9`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-9`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-9`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-9`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-9`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-9`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--backfill-batch-delay`,type:`string`,id:`param-backfill-batch-delay-1`,children:_jsx(_components.p,{children:`Duration of delay between batch backfills (eg. 1s, 1000ms)`})}),`\n`,_jsx(ParamField,{path:`--backfill-batch-size`,type:`string`,id:`param-backfill-batch-size-1`,children:_jsx(_components.p,{children:`Number of rows backfilled in each batch`})}),`\n`,_jsx(ParamField,{path:`--complete`,type:`boolean`,id:`param-complete-1`,children:_jsx(_components.p,{children:`Mark the migration as complete`})}),`\n`,_jsx(ParamField,{path:`--skip-validation`,type:`boolean`,id:`param-skip-validation`,children:_jsx(_components.p,{children:`Skip migration validation`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-9`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-9`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-9`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(ParamField,{path:`file`,type:`string`,required:true,id:`param-file`,children:_jsx(_components.p,{children:`The migration file to start`})}),`\n`,_jsx(Heading,{level:`2`,id:`status`,children:`status`}),`\n`,_jsx(_components.p,{children:`Show pgroll status`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--profile value] [--debug] [--json]`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-10`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-10`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-10`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-10`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-10`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-10`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-10`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-10`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-10`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-10`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-10`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-10`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-10`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-10`,children:_jsx(_components.p,{children:`Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.`})}),`\n`,_jsx(Heading,{level:`2`,id:`convert`,children:`convert`}),`\n`,_jsx(_components.p,{children:`Convert SQL statements to a pgroll migration`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`xata`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` roll`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` convert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--lock-timeout `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--pgroll-schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--postgres-url `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--role `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--schema `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`value]`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--use-version-schema] [--verbose] [--organization value] [--project value] [--branch value] [--database value] [--json] [--profile value] [--debug] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`file`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`--lock-timeout`,type:`string`,id:`param-lock-timeout-11`,children:_jsx(_components.p,{children:`Postgres lock timeout in milliseconds for pgroll DDL operations`})}),`\n`,_jsx(ParamField,{path:`--pgroll-schema`,type:`string`,id:`param-pgroll-schema-11`,children:_jsx(_components.p,{children:`Postgres schema to use for pgroll internal state`})}),`\n`,_jsx(ParamField,{path:`--postgres-url`,type:`string`,id:`param-postgres-url-11`,children:_jsx(_components.p,{children:`Postgres URL`})}),`\n`,_jsx(ParamField,{path:`--role`,type:`string`,id:`param-role-11`,children:_jsx(_components.p,{children:`Optional postgres role to set when executing migrations`})}),`\n`,_jsx(ParamField,{path:`--schema`,type:`string`,id:`param-schema-11`,children:_jsx(_components.p,{children:`Postgres schema to use for the migration`})}),`\n`,_jsx(ParamField,{path:`--use-version-schema`,type:`boolean`,id:`param-use-version-schema-11`,children:_jsx(_components.p,{children:`Create version schemas for each migration`})}),`\n`,_jsx(ParamField,{path:`--verbose`,type:`boolean`,id:`param-verbose-11`,children:_jsx(_components.p,{children:`Enable verbose logging`})}),`\n`,_jsx(ParamField,{path:`--organization`,type:`string`,id:`param-organization-11`,children:_jsx(_components.p,{children:`Organization ID`})}),`\n`,_jsx(ParamField,{path:`--project`,type:`string`,id:`param-project-11`,children:_jsx(_components.p,{children:`Project ID`})}),`\n`,_jsx(ParamField,{path:`--branch`,type:`string`,id:`param-branch-11`,children:_jsx(_components.p,{children:`Branch ID or name`})}),`\n`,_jsx(ParamField,{path:`--database`,type:`string`,id:`param-database-11`,children:_jsx(_components.p,{children:`Database name on the branch`})}),`\n`,_jsx(ParamField,{path:`--json`,type:`boolean`,id:`param-json-11`,children:_jsx(_components.p,{children:`Output migration file in JSON format instead of YAML`})}),`\n`,_jsx(ParamField,{path:`--profile`,type:`string`,id:`param-profile-11`,children:_jsx(_components.p,{children:`The profile to use`})}),`\n`,_jsx(ParamField,{path:`--debug`,type:`boolean`,id:`param-debug-11`,children:_jsx(_components.p,{children:`Print where each resolved value came from`})}),`\n`,_jsx(ParamField,{path:`file`,type:`string`,required:true,id:`param-file-1`,children:_jsx(_components.p,{children:`The migration file to convert`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"roll","description":"Run pgroll to manage PostgreSQL schema migrations","href":"/cli/roll"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"baseline","slug":"baseline","depth":2,"children":[]},{"title":"complete","slug":"complete","depth":2,"children":[]},{"title":"init","slug":"init","depth":2,"children":[]},{"title":"latest","slug":"latest","depth":2,"children":[{"title":"latest migration","slug":"latest-migration","depth":3,"children":[]},{"title":"latest schema","slug":"latest-schema","depth":3,"children":[]}]},{"title":"migrate","slug":"migrate","depth":2,"children":[]},{"title":"update","slug":"update","depth":2,"children":[]},{"title":"pull","slug":"pull","depth":2,"children":[]},{"title":"rollback","slug":"rollback","depth":2,"children":[]},{"title":"start","slug":"start","depth":2,"children":[]},{"title":"status","slug":"status","depth":2,"children":[]},{"title":"convert","slug":"convert","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/xata/42338cddc6e87248/tracking.js"],"subdomain":"xata","siteName":"Xata","title":"roll - Xata","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T09:12:56.712Z","originalFileLocation":"cli/roll.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run pgroll to manage PostgreSQL schema migrations\">\u003cmeta data-mint-head name=\"application-name\" content=\"Xata\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"roll - Xata\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run pgroll to manage PostgreSQL schema migrations\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Xata\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://xata.io/docs/cli/roll\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://xata.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=roll\u0026amp;description=Run+pgroll+to+manage+PostgreSQL+schema+migrations\u0026amp;theme=1df92fd69c10f331b7ecd2a0\u0026amp;signature=1590d88be1ddd1c45e79d0671ac0c5e0a75d9c1c048cec59fedab9fa1011b874\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"roll - Xata\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run pgroll to manage PostgreSQL schema migrations\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://xata.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=roll\u0026amp;description=Run+pgroll+to+manage+PostgreSQL+schema+migrations\u0026amp;theme=1df92fd69c10f331b7ecd2a0\u0026amp;signature=1590d88be1ddd1c45e79d0671ac0c5e0a75d9c1c048cec59fedab9fa1011b874\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/xata/aBhvMQRuTYnJZzL3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Xata\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#735adc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://xata.io/docs/cli/roll\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/cli/roll.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://xata.io/#organization\",\"name\":\"Xata\",\"url\":\"https://xata.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/xata/rYmGPszzEBdWMgvX/logo/light.svg?fit=max\u0026auto=format\u0026n=rYmGPszzEBdWMgvX\u0026q=85\u0026s=4ef098482078f4153c39dc17dd26476b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://xata.io/docs#website\",\"name\":\"Xata\",\"url\":\"https://xata.io/docs\",\"publisher\":{\"@id\":\"https://xata.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://xata.io/docs/cli/roll#webpage\",\"url\":\"https://xata.io/docs/cli/roll\",\"name\":\"roll\",\"description\":\"Run pgroll to manage PostgreSQL schema migrations\",\"dateModified\":\"2026-11-13T09:12:56.712Z\",\"isPartOf\":{\"@id\":\"https://xata.io/docs#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://xata.io/docs/cli/roll#article\",\"headline\":\"roll\",\"name\":\"roll\",\"description\":\"Run pgroll to manage PostgreSQL schema migrations\",\"url\":\"https://xata.io/docs/cli/roll\",\"mainEntityOfPage\":{\"@id\":\"https://xata.io/docs/cli/roll#webpage\"},\"dateModified\":\"2026-11-13T09:12:56.712Z\",\"publisher\":{\"@id\":\"https://xata.io/#organization\"},\"isPartOf\":{\"@id\":\"https://xata.io/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Xata\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Xata\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/cli/roll.md","siteName":"Xata","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","directory":"card","pages":[{"title":"Guides","href":"/overview"}]},{"tab":"API Reference","icon":"terminal","pages":[{"title":"API Reference","href":"/api-reference/organizations/get-list-of-organizations"}]},{"tab":"CLI Reference","icon":"square-terminal","pages":[{"title":"Command-line Interface","href":"/cli"},{"title":"skill","href":"/cli/skill"},{"title":"init","href":"/cli/init"},{"title":"auth","href":"/cli/auth"},{"title":"organization","href":"/cli/organization"},{"title":"project","href":"/cli/project"},{"title":"branch","href":"/cli/branch"},{"title":"keys","description":"Create, list, and delete API keys","href":"/cli/keys"},{"title":"roll","href":"/cli/roll"},{"title":"clone","description":"Clone another PostgreSQL database with anonymization","href":"/cli/clone"},{"title":"stream","href":"/cli/stream"},{"title":"status","href":"/cli/status"},{"title":"version","href":"/cli/version"},{"title":"licenses","href":"/cli/licenses"},{"title":"checkout","href":"/cli/checkout"},{"title":"scratch","href":"/cli/scratch"},{"title":"console","href":"/cli/console"},{"title":"upgrade","href":"/cli/upgrade"},{"title":"completions","href":"/cli/completions"}]},{"tab":"Open Source","icon":"code-branch","menu":[{"item":"pgstream","icon":"right-left","description":"Postgres replication with schema-aware streaming.","pages":[{"title":"pgstream","href":"/opensource/pgstream/overview"}]}],"pages":[{"title":"Open Source","href":"/opensource/pgstream/overview"}]}]},"basePath":"","title":"roll - Xata","buildId":"dpl_eBQnj73Q1gDRVNqNsS3Yt9yPkTEW","deploymentId":"dpl_eBQnj73Q1gDRVNqNsS3Yt9yPkTEW","dynamics":[],"chunks":[]}