How can an importer read an application-defined database format version?

user_version stores an application-defined integer in the database header. SQLite assigns no application meaning to the value.

SQLite example and interpretation

A migration can mark version three after making the corresponding schema changes. Writing that number alone creates no columns, so keep it synchronized with the migration.

PRAGMA user_version=3;
PRAGMA user_version;

Result [[3]]

中文

导入工具怎样读取应用自定义的数据库格式版本?

user_version 允许应用在数据库头保存一个整数,SQLite 核心不替应用解释它。

SQLite 示例与适用条件

迁移程序可在完成相应结构变更后标记版本 3。单独改数字不会创建新列,应将标记更新与迁移保持一致。

PRAGMA user_version=3;
PRAGMA user_version;

结果 [[3]]

References / 参考来源

Keep reading / 继续阅读