Module
migration
github.com/riducms/ridu/migration — Advanced, database-independent vocabulary for immutable and reviewable migration artifacts.
Artifacts 7
type migration.ArtifactThe immutable definition of one migration.
constant migration.ArtifactVersionThe immutable migration artifact format emitted by this release.
type migration.ArtifactIdentityOne migration file identity used to bind an executable to committed history.
migration.DigestArtifactHistory()Hash one complete ordered migration filename/digest history.
migration.NewArtifact()Create an artifact shell with embedded manifest lineage.
migration.DecodeArtifact()Strictly decode and validate supported artifact JSON.
migration.DigestManifest()Hash canonical manifest bytes with SHA-256.
Review model 7
type migration.RiskA stable machine-readable planning finding.
type migration.RiskLevelNotice, warning, or destructive operational impact.
type migration.StepKindThe closed migration executor vocabulary.
type migration.RenameExplicit committed content-identity intent.
type migration.FieldRenameOne explicit authored field-path continuity inside a collection rename.
type migration.OperationOne physical or semantic planner operation before checkpointed phases are built.
type migration.DataTransformDescriptorImmutable artifact identity for one compiled migration callback.
Execution 14
interface migration.DataTransactionTransaction-bound content operations available to a compiled migration callback.
type migration.DataTransformCallbackOne compiled direction of a reviewed data migration.
type migration.DataTransformExecutable up and down callbacks bound to an immutable descriptor.
migration.DataTransformChecksum()Compute the lowercase SHA-256 identity of reviewed callback source bytes.
type migration.ProjectActionLifecycle operation delegated to an application’s compiled migration driver.
type migration.ProjectRequestStructural paths selected by a portable project migration command.
interface migration.ProjectDriverApplication-compiled callbacks behind adapter-owned project migration commands.
type migration.PhaseOne resumable execution boundary.
type migration.PlannerPlanner name and version recorded on a migration artifact.
type migration.PhaseModeThe transaction boundary for a resumable phase.
type migration.StepOne stable independently ledgered executor invocation.
migration.MarshalStepPayload()Encode a compact deterministic typed step payload.
migration.PhysicalDigestSeed()Create the initial reviewed physical-contract digest.
migration.PhasePhysicalDigest()Advance the physical contract through one complete phase.
Payloads 14
type migration.SQLPayloadOne transactional SQL statement.
type migration.RenamePayloadExplicit content-identity continuity payload.
type migration.DataTransformPayloadArtifact-safe identity for one application-compiled callback.
type migration.BackfillReferencesPayloadResumable keyset-batch reference backfill settings.
type migration.RetireResourcesPayloadStable resource identities retired by one bounded cleanup.
type migration.AssertSchemaPayloadThe closed marker payload for a reviewed physical-schema assertion.
type migration.AuditRequiredValuesPayloadThe fields whose stored values a required-value audit checks.
type migration.RequiredFieldAddressOne field of an artifact's after manifest, addressed by its resource and canonical path, or by its block definition.
type migration.ConcurrentIndexActionA closed create or drop action for a non-transactional index phase.
type migration.ConcurrentIndexPayloadA structured concurrent-index operation without free-form non-transaction SQL.
type migration.MongoDBCreateIndexPayloadPhysical identity for one planner-owned MongoDB index.
type migration.MongoDBDropIndexPayloadPhysical identity for one exact planner-owned MongoDB index removal.
type migration.MongoDBRenameResourcePayloadOne confirmed MongoDB collection-identity move without serialized namespace names.
type migration.MongoDBDropResourcesPayloadThe exact reviewed stable identities whose MongoDB namespaces are retired.
Methods 9
Constants 36
constant migration.ConcurrentIndexCreateconstant migration.ConcurrentIndexDropconstant migration.PhaseBatchconstant migration.PhaseNoTransactionconstant migration.PhaseTransactionconstant migration.PhysicalContractVersionconstant migration.ProjectApplyconstant migration.ProjectDownconstant migration.ProjectFreshconstant migration.ProjectRefreshconstant migration.ProjectResetconstant migration.ProjectVerifyconstant migration.RiskDestructiveconstant migration.RiskNoticeconstant migration.RiskWarningconstant migration.RunnerContractVersionconstant migration.StepAssertSchemaconstant migration.StepAuditRequiredValuesconstant migration.StepBackfillReferencesconstant migration.StepConcurrentIndexconstant migration.StepDataTransformconstant migration.StepMongoDBAssertSchemaconstant migration.StepMongoDBCreateIndexconstant migration.StepMongoDBDropIndexconstant migration.StepMongoDBDropResourcesconstant migration.StepMongoDBRebuildHeadReservationsconstant migration.StepMongoDBRenameResourceconstant migration.StepRenameContentconstant migration.StepRetireResourcesconstant migration.StepSQLconstant migration.ExistingDraftconstant migration.ExistingPublishedconstant migration.ExistingRequireEmptyconstant migration.RequiredScopeLocalizedconstant migration.RequiredScopeUnlocalizedconstant migration.StepEnableVersions
Types 5
type migration.BaselineReplacementOptionsBaselineReplacementOptions 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.EnableVersionsPayloadEnableVersionsPayload names one resource that starts keeping versions and what becomes of the documents it already stores.
type migration.ExistingDocumentsExistingDocuments is what becomes of the documents a collection or global already stores when it starts keeping versions.
type migration.Runner contractsPublic type Runner contracts from github.com/riducms/ridu/migration.
type migration.UpdateRequestUpdateRequest 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.ErrReplacementNeedsConfirmationErrReplacementNeedsConfirmation 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.