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 ReconcileTables ¶ added in v0.1.39
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. It adds missing tables, columns, and indexes by default. AllowRebuilds permits compatible table reshapes while still refusing drops and type changes. Tables and views nothing declares are neither inspected nor touched.
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 ¶ added in v0.1.39
type ReconcileOptions struct {
AllowRebuilds bool
}