Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Database lifecycle: extension schema installation, migrations, and connection/schema validation.

Re-exports the schema installers, the MigrationService and its result and status types, and the standalone validation helpers (validate_database_connection, validate_write_pool_is_primary, validate_table_exists, validate_column_exists).

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Structs§

AppliedMigration
A recorded migration.
BaselineStamp
One extension_migrations row recording a migration as applied without having executed it.
BootstrapLockGuard
Session-pinned advisory lock serialising concurrent bootstraps.
ChecksumDrift
DeferredForeignKey
ExpensiveStatement
One statement that rewrites or rescans a hot table. position is 1-based, matching how the runner numbers statements when one fails.
ExtensionMigrationStatus
ForeignKeyDrift
FreshnessCheck
MarkAppliedOutcome
MigrationConfig
MigrationCost
One migration’s expensive statements and what it declared about them. malformed is set when the body carries a @cost line that does not parse.
MigrationResult
MigrationService
MigrationStatus
OrphanMigrationLedger
OrphanedMigration
An applied migration whose slot the extension no longer declares at all.
PendingMigration
RepairResult
ReplicaStatus
SchemaInstallReport
What install_extension_schemas* applied and what it could not.
SchemaResidue
SlotCollision
An applied migration whose slot is now occupied by a differently-named file.
SplitCreateTable
TombstonedSlot
A slot declared spent by a .tombstone file.
UndeclaredTable

Enums§

FkDeferralError

Constants§

BOOTSTRAP_ADVISORY_LOCK_KEY
HOT_TABLES

Functions§

audit_migration_cost
audit_one
audit_schema_residue
check_migration_references
install_extension_schemas
install_extension_schemas_full
install_extension_schemas_with_config
is_retirement
replica_status
split_create_table_foreign_keys
validate_column_exists
validate_database_connection
validate_table_exists
validate_write_pool_is_primary