PRAGMA schema_version
for testing; not for applications
The schema_version pragma will get or set the value of the schema-version integer at offset 40 in the database header.
PRAGMA schema.schema_version; PRAGMA schema.schema_version = integer ;
What the SQLite documentation says
The schema_version pragma will get or set the value of the schema-version integer at offset 40 in the database header.
SQLite automatically increments the schema-version whenever the schema changes. As each SQL statement runs, the schema version is checked to ensure that the schema has not changed since the SQL statement was prepared. Subverting this mechanism by using "PRAGMA schema_version=N" to change the value of the schema_version may cause SQL statement to run using an obsolete schema, which can lead to incorrect answers and/or database corruption. It is always safe to read the schema_version, but changing the schema_version can cause problems. For this reason, attempts to change the value of schema_version are a silent no-op when defensive mode is enabled for a database connection.
Warning: Misuse of this pragma can result in database corruption.
For the purposes of this pragma, the VACUUM command is considered a schema change, since VACUUM will usually alter the "rootpage" values for entries in the sqlite_schema table.
See also the application_id pragma and user_version pragma.
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.