function

CreateArtifact

Publish a MongoDB migration artifact with reviewed semantic intent.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
directorystringThe directory value.
namestringThe name value.
afterschema.ManifestThe after value.
nowtime.TimeThe now value.
optionsArtifactOptionsThe options value.

Returns

The declared result.

(CreatedArtifact, error)

How it works

This is the creator used by ridu migrate create. It validates the immutable prefix, freezes confirmed renames and transform descriptors, records reviewed retirement/destructive findings, and never opens MongoDB.

Full signature

func CreateArtifact( ctx context.Context, directory, name string, after schema.Manifest, now time.Time, options ArtifactOptions, ) (CreatedArtifact, error)

Source adapters/mongodb/migrations.go:73

Related types

  • Manifest

    An immutable versioned schema contract.

  • ArtifactOptions

    Reviewed semantic intent frozen into a planner 5.0.0 artifact.

  • CreatedArtifact

    The stable filesystem identity of one newly published artifact.