In-process declarative migrations for embedded SQLite with zero Cgo (pure-Go modernc.org/sqlite). The same schema.sql single-source-of-truth workflow as the PostgreSQL example, but the shadow compile runs in an in-memory database — fully offline.
Usage pattern
Open the database with sql.Open("sqlite", dsn); a sqlite:// or .db DSN selects the SQLite dialect automatically (or set Dialect: grizzle.DialectSQLite explicitly).
Call grizzle.Sync(ctx, db, grizzle.Options{SchemaSQL: schemaSQL}) — no network, no locks beyond SQLite's own file locking.
Column type changes and drops route through Grizzle's SQLite 12-step table rebuild engine (chunked keyset copy, savepoint isolation, foreign-key validation, trigger/view preservation).
SQLite scope notes
Multi-schema is supported via TargetSchemas + SQLiteAttach (ATTACH DATABASE). Cross-database FKs are not enforced by SQLite and are not validated.
CHECK constraints are parsed from sqlite_schema DDL, emitted on create/rebuild, and diffed (drift rebuilds the table; removals need AllowDropCheck + DROP_CHECK).
Running
go run . # uses ./app.db by default
go test -tags integration ./...