Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCoreAuthorityConflict = errors.New("core database authority conflicts with the Host ownership boundary")
View Source
var ErrCoreUpgradeIncompatible = errors.New("core upgrade is incompatible with an enabled raw database extension")
View Source
var ErrOnlineMigrationUnsafe = errors.New("pending migrations are not safe for an online update")
Functions ¶
func IsUpToDate ¶
IsUpToDate performs a read-only schema check for zero-downtime releases. Both Core and River migrations must exactly match the target binary; callers must fall back to the maintenance-window deploy path when this returns false.
Types ¶
type Config ¶
type Config struct {
DatabaseURL string
Logger *slog.Logger
// TargetCoreVersion pins the Core version this run migrates to. Leave it
// empty to derive it from the build identity; that derivation also reports
// whether the value is a real declaration or the untagged-development
// fallback sentinel.
TargetCoreVersion string
}
type OnlineMigrationPlan ¶
type OnlineMigrationPlan struct {
PendingCore []string
}
func CheckOnlineSafe ¶
func CheckOnlineSafe(ctx context.Context, cfg Config) (OnlineMigrationPlan, error)
CheckOnlineSafe permits only explicitly declared, backward-compatible Core migrations. River must already match because its internal migrations do not carry SForum's old/new binary compatibility declaration.
func (OnlineMigrationPlan) RequiresMigration ¶
func (plan OnlineMigrationPlan) RequiresMigration() bool
Click to show internal directories.
Click to hide internal directories.