Your build starts here
Replace bracketed details with your own goal, context, and checks. Keep the first build small enough to inspect.
Plan a migration of [SQLite development database] for [table change]. Inspect the installed SQLite version and the full existing schema, including indexes, triggers, views, and foreign-key relationships. Determine whether the documented ALTER TABLE operation supports the change; if a table rebuild is required, follow the current official generalized procedure rather than improvising rename order or editing the schema catalog. Use a disposable copy and retain a verified recovery copy. Record relevant pragma state and restore settings appropriately through the documented workflow. Include fixture rows that exercise defaults, nullability, uniqueness, and relationships. Inject a failure during copying and verify the original usable state or documented recovery. After success, compare row identities and dependent objects and run the relevant integrity and foreign-key checks. Report changes that cannot be reversed without the retained data.Make this prompt yours
Use for SQLite structural changes. The exact procedure is operation- and version-dependent; apply it to a disposable database before a real migration.
You might also hear
- SQLite rebuild
- ALTER TABLE
- trigger migration
- foreign key check
- schema copy
The docs behind it
These references explain the underlying concepts and APIs. The prompt templates and project plans are original examples to adapt to your own setup.
Research sources reviewed .
Editorial review · October 28, 2026
Limited: Original instructional template; not executed. SQLite's documented generalized rebuild preserves dependent schema through a specific sequence; the prompt correctly avoids improvised rename/catalog edits and requires disposable recovery fixtures.