SQLite PRAGMA and Administration Cheatsheet/Track application schema version

Read or set the user-defined schema version number.

Section: Performance and file settings

Track application schema version

sql
sql
PRAGMA user_version;
PRAGMA user_version = 12;
Explanation

A simple and popular migration bookkeeping mechanism in SQLite apps.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Performance and file settings
Inspect page size
Read the database page size.
OpenIn sheetsqlsame section
Set cache size
Adjust the number of pages or kibibytes used for page cache.
OpenIn sheetsqlsame section
Set synchronous mode
Control durability vs speed tradeoffs.
OpenIn sheetsqlsame section
Control temporary storage location
Choose file-backed or memory temp storage.
OpenIn sheetsqlsame section
Enable foreign key enforcement
Turn on FK checks for the current connection.
OpenIn sheetsql1 tag match
Check current foreign key setting
Read whether FK enforcement is enabled.
OpenIn sheetsql1 tag match