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

sqlite

package
v1.0.6 Latest Latest
Warning

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

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

Documentation

Overview

Package sqlite reconciles SQLite tables with programmatic Atlas declarations. Filesystem-backed HCL migrations use the target-aware parent migrate package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PendingChanges

func PendingChanges(ctx context.Context, database schema.ExecQuerier, options ReconcileOptions, tables ...*schema.Table) ([]schema.Change, error)

PendingChanges reports the changes ReconcileTables would apply, without applying them. It only reads the schema, so a caller can skip opening a migration transaction when nothing is pending. It applies the same drop policy as ReconcileTables.

func ReconcileTables

func ReconcileTables(ctx context.Context, database schema.ExecQuerier, options ReconcileOptions, tables ...*schema.Table) error

ReconcileTables brings database's tables up to the tables declared: Atlas inspects each declared table, diffs it against its declaration, and applies the plan. Column and table drops are skipped unless AllowDrops is enabled. Other supported changes may rebuild tables. Views are outside the declared table schema.

A column may be declared by its raw SQLite type alone (ColumnType.Raw); ReconcileTables parses it as inspection does, so a declaration and the table it created compare equal.

Types

type ReconcileOptions

type ReconcileOptions struct {
	AllowDrops bool
	// AllowRebuilds retains source compatibility; supported rebuilds are automatic.
	AllowRebuilds bool
}

Jump to

Keyboard shortcuts

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