Interface SchemaMigrationOptions

How the runner names its ledger and lock, and what it does with surprises.

interface SchemaMigrationOptions {
    table?: string;
    checksumColumn?: string;
    lockKey?: string | number;
    unknown?: "ignore" | "refuse";
    outsideTransactionMarker?: string;
}

Properties

table?: string

The ledger table, schema-qualified if need be. Default: schema_migrations.

checksumColumn?: string

The ledger column that holds each file's SHA-256 in hex. Default: checksum.

lockKey?: string | number

The PostgreSQL advisory lock key: an integer, or text hashed with hashtext(). Default: 724313571. Runners that share a database share a key.

unknown?: "ignore" | "refuse"

A ledger row whose file the list lacks (the database is ahead of the code): 'refuse' (the default) stops before applying anything; 'ignore' goes on.

outsideTransactionMarker?: string

A file whose first line, trimmed, is this runs outside a transaction. Default: -- outside transaction.