-- Generated by Gleam CI helpers. module CI.Component (run, version, init, validate, start, complete, rollback, migrate, status, analyze, baseline, pull, convert, update, create, latest, latest_migration, latest_schema, latest_url, completion) where import Prelude import CI.Contract as Contract import Data.Maybe (Maybe) import Effect (Effect) import CI.ModuleDependencies as Dependencies import CI.CLI as Native -- | Execute any pgroll feature with literal CSV arguments. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: String } -> Effect Contract.ExecutionResult run args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "run" json -- | Print the installed pgroll version. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResult version args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "version" json -- | Initialize pgroll state in the target database; no migration file is required. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. init :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult init args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "init" json -- | Validate a migration file against the target database before application. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param file Existing YAML or JSON migration file to validate against the target database. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. validate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, file :: String, arguments :: Maybe String } -> Effect Contract.ExecutionResult validate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "validate" json -- | Start a migration, backfill data, and optionally complete it. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param file Existing YAML or JSON migration file to start. -- | @param backfillBatchDelay Delay between backfill batches as a Go duration, for example 1s or 1000ms. -- | @param backfillBatchSize Positive number of rows per backfill batch; native default 1000. -- | @param complete Complete the migration immediately after applying it; native default false. -- | @param skipValidation Explicitly bypass native migration validation; native default false. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. start :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, file :: String, backfillBatchDelay :: Maybe String, backfillBatchSize :: Maybe Int, complete :: Maybe Boolean, skipValidation :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult start args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "start" json -- | Complete the currently active migration in the database; no migration file is required. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. complete :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult complete args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "complete" json -- | Roll back the currently active migration; completed migrations retain native rollback limitations. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. rollback :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult rollback args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "rollback" json -- | Apply outstanding migrations from a directory and propagate native failures. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param directory Existing directory containing ordered migration files. -- | @param backfillBatchDelay Delay between backfill batches as a Go duration, for example 1s or 1000ms. -- | @param backfillBatchSize Positive number of rows per backfill batch; native default 1000. -- | @param complete Complete the final migration instead of leaving it active. -- | @param expectOne Abort when more than one outstanding migration would be applied. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. migrate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, directory :: String, backfillBatchDelay :: Maybe String, backfillBatchSize :: Maybe Int, complete :: Maybe Boolean, expectOne :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult migrate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "migrate" json -- | Report active migration and schema state in the target database. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "status" json -- | Analyze the target database SQL schema using the native hidden diagnostic command. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. analyze :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult analyze args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "analyze" json -- | Reset migration history to a baseline and write its placeholder file without a confirmation prompt. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param baselineVersion Name of the baseline migration; this resets migration history. -- | @param directory Directory for the generated baseline file; created by pgroll if absent. -- | @param json Write migration files in JSON instead of YAML. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. baseline :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, baselineVersion :: String, directory :: String, json :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult baseline args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "baseline" json -- | Pull missing migration history from the database into local files. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param directory Destination directory for migration history; created by pgroll if absent. -- | @param json Write migration files in JSON instead of YAML. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. pull :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, directory :: String, json :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult pull args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "pull" json -- | Convert SQL statements from a file to a pgroll migration using native conversion rules. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param file Existing SQL input file to convert to a pgroll migration. -- | @param json Write migration files in JSON instead of YAML. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. convert :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, file :: String, json :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult convert args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "convert" json -- | Rewrite outdated migration files in place; review changes before committing them. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param directory Existing directory of migration files to rewrite to the current format. -- | @param json Write migration files in JSON instead of YAML. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. update :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, directory :: String, json :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult update args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "update" json -- | Create an empty named migration file noninteractively in the working directory. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param name Migration filename stem, including a relative path if desired; pgroll adds .yaml or .json. -- | @param json Write migration files in JSON instead of YAML. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. create :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, name :: String, json :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult create args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "create" json -- | Access native latest subcommands through the CSV arguments string. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. latest :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResult latest args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "latest" json -- | Print the latest migration from the target database or local migration directory. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param local Existing local migration directory; omit to discover the latest version from the target database. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. latest_migration :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, local :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResult latest_migration args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "latest_migration" json -- | Print the latest schema from the target database or local migration directory. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param local Existing local migration directory; omit to discover the latest version from the target database. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. latest_schema :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, local :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResult latest_schema args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "latest_schema" json -- | Print the latest connection URL with version schema search_path from the target database or local migration directory. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param postgresUrl PostgreSQL connection URL; prefer inherited PGROLL_PG_URL for credentials because explicit arguments appear in execution plans. -- | @param schema PostgreSQL schema to migrate; native default public. -- | @param stateSchema Schema containing pgroll internal state; native default pgroll. -- | @param lockTimeout PostgreSQL DDL lock timeout in milliseconds; native default 500. -- | @param role Optional PostgreSQL role used while executing migrations. -- | @param useVersionSchema Create version schemas for migrations; native default true. Explicit false is passed through. -- | @param verbose Enable native verbose logging. -- | @param local Existing local migration directory; omit to discover the latest version from the target database. -- | @param connectionString Optional connection URL to rewrite; omit to use PGROLL_PG_URL or postgresUrl. Output may contain credentials. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. latest_url :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, postgresUrl :: Maybe String, schema :: Maybe String, stateSchema :: Maybe String, lockTimeout :: Maybe Int, role :: Maybe String, useVersionSchema :: Maybe Boolean, verbose :: Maybe Boolean, local :: Maybe String, connectionString :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResult latest_url args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "latest_url" json -- | Generate shell completion scripts through literal native CSV arguments. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param arguments Additional literal CLI tokens as comma-separated text; double-quote CSV entries containing commas and double embedded quotes. No shell expansion occurs. completion :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResult completion args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "pgroll" "completion" json