Help us shape the future of Go! Take the 2026 Go Developer Survey

deployments

package
v0.3.4 Latest Latest
Warning

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

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

Documentation

Overview

Package deployments is the store's schema as SQL scripts, one directory per engine, compiled into the binary and applied by golib dao/deploy (docs/ops/schema-scripts.md).

sqlite/000001_update_initialize_tables.sql   the baseline: no revert
sqlite/000002_update_<slug>.sql              a change …
sqlite/000002_revert_<slug>.sql              … and its undo

dao/deploy reads the tree, refuses a set that is not dense and paired, applies every pending script in one transaction and keeps the ledger. A released script never changes; the test holds each released digest.

Index

Examples

Constants

This section is empty.

Variables

View Source
var Engines = []string{dao.DialectSQLite}

Engines are the engines the store has scripts for: each is a directory, named for its dialect.

Functions

func FS

func FS() fs.FS

FS is the script tree.

Example
package main

import (
	"fmt"

	"github.com/yongjohnlee80/golib/dao"
	"github.com/yongjohnlee80/golib/dao/deploy"

	"github.com/yongjohnlee80/autodoc/sql/deployments"
)

func main() {
	all, _ := deploy.Load(deployments.FS(), dao.DialectSQLite)
	fmt.Println(all[0].Name)
}
Output:
000001_update_initialize_tables.sql

func Runner

func Runner() *deploy.Runner

Runner applies the store's scripts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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