Module

migration

github.com/riducms/ridu/migration — Advanced, database-independent vocabulary for immutable and reviewable migration artifacts.

Artifacts 7

Review model 7

Execution 14

Payloads 14

Methods 9

Constants 36

Types 5

  • type migration.BaselineReplacementOptions

    BaselineReplacementOptions controls an explicit rewrite of recorded history. PreviousDirectory must contain the immutable artifacts the database records; when empty, the replacement directory is also used as the previous history.

  • type migration.EnableVersionsPayload

    EnableVersionsPayload names one resource that starts keeping versions and what becomes of the documents it already stores.

  • type migration.ExistingDocuments

    ExistingDocuments is what becomes of the documents a collection or global already stores when it starts keeping versions.

  • type migration.Runner contracts

    Public type Runner contracts from github.com/riducms/ridu/migration.

  • type migration.UpdateRequest

    UpdateRequest changes one document from a data transform. Values patch the stored document unless ReplaceValues makes them its complete authored state. The transaction applies the patch to the stored row it locks, never to a document the callback read or edited.

Variables 1

  • variable migration.ErrReplacementNeedsConfirmation

    ErrReplacementNeedsConfirmation reports a baseline replacement that would rewrite the history of a database exactly at its recorded head. Repeat the replacement with AllowProduction once its application processes are stopped.

Functions 3

  • migration.ParseExistingDocuments()

    ParseExistingDocuments reads one ExistingDocuments choice.

  • migration.UnmanagedSchemaError()

    UnmanagedSchemaError reports database objects found where a migration runner expected an empty database. `ridu dev` leaves exactly this behind: it synchronizes a schema directly and never records migration history.

  • migration.VersionsEnabled()

    VersionsEnabled returns the resources of after, collections then globals, that keep versions while the same resource in before does not. renames maps a renamed collection's before stable ID to its after one. Any other resource new in after starts versioned with nothing stored.