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 ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.