sqlite

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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