Module
postgres
github.com/riducms/ridu/adapters/postgres — The official PostgreSQL store, safe development schema sync, and immutable production migration runner.
Functions 4
postgres.Open()Open the PostgreSQL store with bounded default pool settings.
postgres.OpenWithConfig()Open the store with explicit pool and PostgreSQL session bounds.
postgres.ProjectMigrations()ProjectMigrations binds checksum-protected callbacks into the compiled project while PostgreSQL retains ownership of every migration transaction and the credential-bearing connection boundary.
postgres.CreateArtifact()CreateArtifact derives the predecessor from committed history and writes a deterministic artifact for the current PostgreSQL planner.
Types 6
type postgres.PoolConfigProduction connection-pool, upload-lock-pool, lifetime, health, and server timeout controls.
type postgres.StoreA PostgreSQL implementation of Ridu’s document, snapshot, auth, preference, task, job, lock, upload-reference, and migration store contracts.
type postgres.FieldRenameOne migration-time field identity match confirmed by the application author.
type postgres.ArtifactOptionsArtifactOptions are the reviewed decisions a PostgreSQL migration records beyond its before and after manifests.
type postgres.CreatedArtifactCreatedArtifact is the immutable file and plan produced by CreateArtifact.
type postgres.Migration boundary codesPublic type Migration boundary codes from github.com/riducms/ridu/adapters/postgres.
Methods 62
Store.Close()Store.Ping()Store.Ready()Store.ReadyWithMigrationHistory()Store.Begin()Store.BeginSnapshot()Store.VerifySchema()MaintenanceRequiredError.Error()MaintenanceRequiredError.Is()SafetyError.Error()Store.AcquireDocumentLock()Store.AllowAuthAttempt()Store.CancelTask()Store.ChangePasswordHash()Store.ClaimTasks()Store.CompleteTask()Store.CreateAPIKey()Store.CreateAuthToken()Store.CreateSession()Store.DeleteAPIKey()Store.DeletePreference()Store.DeletePreferences()Store.DeleteSession()Store.DeleteUserSession()Store.DeleteUserSessions()Store.DismissTaskForTarget()Store.EnqueueTask()Store.FailTask()Store.FindAPIKey()Store.FindAuthCredential()Store.FindDocumentLock()Store.FindSession()Store.FindTask()Store.ForceUnlock()Store.GetPreference()Store.HeartbeatTask()Store.ListAPIKeys()Store.ListSessions()Store.ListTasks()Store.LockUploadObjects()Store.PruneExpiredAuth()Store.PruneTasks()Store.RecordFailedLogin()Store.ReleaseDocumentLock()Store.ReleaseTask()Store.ResetLoginAttempts()Store.ResetPasswordWithToken()Store.RotateSession()Store.SetPasswordHash()Store.SetPreference()Store.TouchAPIKey()Store.UpgradePasswordHash()Store.VerifyEmailWithToken()Store.AdoptArtifacts()Store.ClearDevelopmentFieldKinds()Store.DevelopmentManifest()Store.FindSessionByID()Store.HasMigrationHistory()Store.ReplaceBaseline()Store.ReviewDevelopmentFieldKinds()Store.ReviewDevelopmentVersions()Store.SyncDevelopmentSchema()
Production migrations 16
postgres.BuildArtifact()Use embedded Atlas planning plus confirmed semantic rename intent to build an immutable migration artifact.
type postgres.RenameConfirmed collection or field identity continuity used during migration planning.
type postgres.MigrationStepStatusDurable status and checkpoint for one production migration step.
type postgres.RenameKindThe migration address being renamed.
type postgres.SafetyErrorA valid transition that needs destructive approval or cannot be determined safe.
postgres.VerifyArtifacts()Replay complete history in an isolated temporary schema, then always drop it.
postgres.VerifyArtifactsWithOptions()Verify history using the same operational admissions and timeouts as application.
Store.ApplyArtifacts()Store.ApplyArtifactsWithOptions()Store.ArtifactStatus()Store.ArtifactPlan()type postgres.RunnerOptionsExplicit operational admissions, bounded timeouts, and resumable boundaries.
type postgres.MigrationStatusOne artifact’s ledger state and optional phased progress.
type postgres.MigrationPhaseStatusOne immutable phase and its step checkpoints.
type postgres.MaintenanceRequiredErrorLists artifacts refused before mutation because maintenance admission is required.
constant postgres.AtlasVersionThe embedded Atlas planner version persisted into migration artifacts.
Constants 4
constant postgres.CodeMigrationPlanMismatchCodeMigrationPlanMismatch is the stable boundary code for an artifact whose contract cannot be reproduced from its embedded immutable inputs.
constant postgres.RenameCollectionRenameCollection preserves a collection while changing its derived identity.
constant postgres.RenameFieldRenameField preserves a field while changing its derived identity.
constant postgres.RenameBlockFieldRenameBlockField preserves a block definition's field at every placement of the block while changing its name.
Variables 1
variable postgres.ErrMaintenanceRequiredErrMaintenanceRequired identifies pending whole-dataset work that requires an explicit maintenance window admission.