schema

package
v1.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ensure

func Ensure(ctx context.Context, d *db.DB) error

Ensure creates the samna_migrate schema and singleton state row if missing.

func GetSchemaVersion

func GetSchemaVersion(ctx context.Context, d *db.DB) (int, error)

func GetToolVersion

func GetToolVersion(ctx context.Context, d *db.DB) (string, error)

func GetYAMLSha

func GetYAMLSha(ctx context.Context, d *db.DB) (string, error)

func Initialized added in v1.3.9

func Initialized(ctx context.Context, d *db.DB) (bool, error)

Initialized reports whether the samna_migrate schema chain has been established, detected by the presence of state.schema_version.

func SetSchemaVersion

func SetSchemaVersion(ctx context.Context, d *db.DB, v int, toolVersion string) error

func WriteYAMLSha

func WriteYAMLSha(ctx context.Context, d *db.DB, newSha, toolVersion string) error

Types

type YAMLSnapshot

type YAMLSnapshot struct {
	StepsFile   string
	DiskYAMLSha string
	YAMLSha     string // value in samna_migrate.state
}

func Snapshot

func Snapshot(ctx context.Context, d *db.DB, stepsFile string) (*YAMLSnapshot, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL