Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingMigrationCode = errors.New("missing migration code for target schema version") ErrInvalidSchemaVersion = errors.New("invalid schema version") )
Functions ¶
This section is empty.
Types ¶
type MigrationScheme ¶
type MigrationScheme struct { BaseSchemaVersion isc.SchemaVersion Migrations []Migration }
func (*MigrationScheme) LatestSchemaVersion ¶
func (m *MigrationScheme) LatestSchemaVersion() isc.SchemaVersion
func (*MigrationScheme) WithTargetSchemaVersion ¶
func (m *MigrationScheme) WithTargetSchemaVersion(v isc.SchemaVersion) (*MigrationScheme, error)
WithTargetSchemaVersion returns a new MigrationScheme where all migrations that correspond to a schema version newer than v are removed. This is necessary in order to replay old blocks without applying the newer migrations.
Click to show internal directories.
Click to hide internal directories.