Name
schema_version — Database schema change control
Common Usage
PRAGMA [database.]schema_version; PRAGMA [database.]schema_version =number;
Description
The schema_version pragma gets or sets the schema
version value that is stored in the database header. This is a
32-bit signed integer value that keeps track of schema changes.
Whenever a schema-altering command is executed (for example,
CREATE... or DROP...), this value is incremented.
This value is used internally by SQLite to keep a number of different caches consistent, as well as keep prepared statements consistent with current database format. Manually altering this value can result in a corrupt database.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access