PackageErrortypeno test imports ittype PackageError = { readonly kind: "guard"; readonly step: string; readonly why: string };What is wrong with a package.
The release package (commons data 0018-sql-history FR-008): what a DBA runs with nothing but a SQL client. An installer that runs the steps in one transaction with each guard written in the SQL itself, a preflight that returns a row only if the database is in the state the release needs, a verification of what must be true after it, a back-out that undoes the steps that can be undone in the opposite order, a runbook, and a manifest. Where a guard cannot be written in the dialect's SQL the package is an error value, unless the project allows it to be left out.
PackageErrortypeno test imports ittype PackageError = { readonly kind: "guard"; readonly step: string; readonly why: string };What is wrong with a package.
PackageOptionsinterfaceno test imports itinterface PackageOptionsWhat a package is given besides the steps.
| Member | Type | What it is |
|---|---|---|
settings | History | |
empty? | string | The hash of the state of an empty database: a release from it has no release before it. |
before? | readonly string[] | Statements run at the start of the transaction, such as the setting that tells a guard a migration is running. |
releasePackagefunctionfunction releasePackage(release: Releasable, dialect: Dialect, options: PackageOptions): Result<readonly Artifact[], readonly PackageError[]>The release package of a frozen history.
| Parameter | What it is |
|---|---|
release | the steps and the objects that are applied again |
dialect | the dialect |
options | the settings, the empty state and what is run first |
Returns: the files, or why a guard cannot be written
Releasableinterfaceno test imports itinterface ReleasableWhat a package is made from.
| Member | Type | What it is |
|---|---|---|
from | string | |
to | string | |
steps | readonly FrozenStep[] | |
repeatable | readonly Repeatable[] |