Migrate SQLite to SQLite
Certified — live-tested pathSame-engine SQLite migrations are how you move between hosts, clouds, or versions — and they still fail in the boring ways: half-copied tables, stale sequences, missing indexes. DBShifts moves the schema and every row, defers constraints for speed, reseeds counters, and proves the result with row counts and checksums.
Free tier · no credit card
Copying a live database file is how you get a corrupt copy
A SQLite database is a file, so copying it looks trivial. Copying it while another process writes produces a file that may not open, or opens with data missing. In WAL mode the most recent changes are not in the main file at all yet; they sit in the -wal file beside it until a checkpoint.
Use the online backup API, the .backup command in the sqlite3 shell, or VACUUM INTO, each of which makes a consistent copy while the database is in use. VACUUM INTO also rewrites the file compactly, which a move usually wants anyway.
Columns accept almost any value unless the table is STRICT
SQLite uses type affinity: a column declared INTEGER will store the text 'abc' without complaint. A database written by several versions of an application often holds values its schema does not suggest, and they only surface when the data meets something stricter.
STRICT tables, available since SQLite 3.37, enforce the declared types. A same-engine move is a good moment to adopt them, but converting a table means rebuilding it, and every value that violates its column type has to be fixed first. Check with typeof() on each column before switching.
ALTER TABLE does less than you expect
SQLite's ALTER TABLE has grown slowly: renaming a column arrived in 3.25 and dropping one in 3.35. Changing a column's type or adding a constraint to an existing column still means creating a new table, copying the rows and swapping the names inside a transaction.
Target the oldest SQLite library that will open the file. A database using features from a newer library, such as STRICT tables or generated columns, cannot be read by an older one, and mobile and embedded deployments often ship older libraries than the machine that built the file.
SQLite → SQLite conversion notes
Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.
- INTEGER columns are 64-bit — DBShifts maps them to BIGINT so large IDs don't overflow 32-bit INT targets.
- Typeless and mixed-affinity columns (SQLite's dynamic typing) are inferred, stringified safely, and flagged.
- NUMERIC affinity values are read exactly, not through float round-trips.
Frequently asked questions
Is SQLite to SQLite migration production-ready in DBShifts?
Yes. SQLite to SQLite is a certified pair: it passes the live certification suite on real SQLite and SQLite servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What changes in a same-engine SQLite migration?
Structurally nothing changes — types map one-to-one. The risks are operational: half-copied tables, sequences left pointing at 1, and indexes that never got rebuilt. DBShifts reseeds counters to MAX(id)+1, defers then rebuilds constraints and indexes, and proves the copy with row counts and checksums.
Can I keep SQLite and SQLite in sync after the initial migration?
Not continuously: SQLite keeps no change log to read. Incremental sync re-runs copy only the rows that changed, using a per-table sync key.
Go deeper
How We Live-Certified All 49 Migration Paths
The certification harness behind this page's claims.
Rehearse the Migration: Dry Runs, Quarantine, and Rollback
Rehearse, isolate failures, and keep the exit open.
Reference
Compared with other tools
Ready to move SQLite to SQLite?
Set up in under two minutes. Validation and rollback included.
Start Free Migration