sqlite

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sqlite reconciles SQLite tables with a declaration through Atlas, as the parent migrate package reconciles PostgreSQL schemas with HCL. It works over a caller's own connection or transaction, so it serves the pure-Go modernc driver without Atlas opening one of its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, database schema.ExecQuerier, tables ...*schema.Table) error

Apply brings database's tables up to the tables declared: Atlas inspects each declared table, diffs it against its declaration, and applies the plan. It only adds — a missing table, column or index. Every other difference (a column dropped, retyped or made NOT NULL, a key or an index changed) would rewrite or discard rows the declaration no longer describes, so Apply refuses it before applying anything, naming each change. Tables and views nothing declares are neither inspected nor touched.

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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