PgFlow.Upstream.Spec.V03 (PgFlow v0.7.2)

Copy Markdown View Source

Import rules for core V03, taken from upstream pgflow 0.17.2.

The pinned sources are the private-queue migration, the force-skip fix, and the four pgflow DDL statements at the top of the telemetry migration. The pgflow_telemetry schema is not imported.

Summary

Functions

Per-file import mode.

Upstream migration filenames, in import order.

Manifest fields that describe the V03 import but are not derived from the SQL.

Upstream commit whose bytes produce core V03.

Portability rules for the 0.17.2 import.

SHA-256 of each pinned upstream file.

Fails unless every omission pair is present on both sides.

Functions

file_modes()

@spec file_modes() :: map()

Per-file import mode.

The telemetry migration keeps only the four pgflow DDL statements. The kept count is seeded onto :telemetry_pgflow_ddl_allowlist before the statement rules run, so replace_desc_runs_index can still see the index.

files()

@spec files() :: [String.t()]

Upstream migration filenames, in import order.

manifest_notes()

@spec manifest_notes() :: map()

Manifest fields that describe the V03 import but are not derived from the SQL.

pinned_sha()

@spec pinned_sha() :: String.t()

Upstream commit whose bytes produce core V03.

rules()

@spec rules() :: [map()]

Portability rules for the 0.17.2 import.

The first matching rule wins. :reject and the seeded allowlist are expected to match nothing in the statements that reach the rule engine. slug_preflight is appended after the localized lock timeout.

source_hashes()

@spec source_hashes() :: %{required(String.t()) => String.t()}

SHA-256 of each pinned upstream file.

verify_omissions(statements, opts)

@spec verify_omissions([String.t()], keyword()) :: :ok | {:error, String.t()}

Fails unless every omission pair is present on both sides.

opts[:v02_sql] replaces the committed V02 script. A missing V02 side returns omit_applied_in_v02: V02 counterpart missing for.