Class RedbSchemaOutdatedException

Assembly: redb.Core.dll

The database schema is behind the version this build requires, and the application could not
bring it up to date itself.

Start-up applies the versioned SQL module automatically when the connected role is allowed to.
It often is not: the DBA grants owner rights for the initial installation and revokes them
afterwards, so ALTER TABLE and CREATE OR REPLACE FUNCTION from the application
fail with a privilege error. Before this type that surfaced as a raw driver exception with no
indication of what to do. Now it says what is deployed, what is required, what could not be
applied, and how to get the script for the DBA — the same text the application would have run.


A distinct type, not InvalidOperationException: a hosting layer has to be able to tell
"someone must run the upgrade script" from every other start-up failure without parsing text.

public class RedbSchemaOutdatedException : Exception, ISerializable

Inheritance

Object→Exception→RedbSchemaOutdatedException

Implements

Properties

Cause

Why the application did not apply the upgrade itself: a privilege error from the driver, or

public Exception? Cause { get; }

DeployedVersion

Module version the database reports, or null when the module is absent.

public string? DeployedVersion { get; }

Provider

Provider name as the dialect reports it, for the operator's convenience.

public string Provider { get; }

RequiredVersion

Module version this build ships and requires.

public string RequiredVersion { get; }

Constructors