Rusqlite Migration

 cljoly/rusqlite_migration Rusqlite Migration is a simple schema migration library for rusqlite using user_version instead of an SQL table to maintain the current schema version. It aims for: simplicity: define a set of SQL statements. Just add more SQL statement to change the schema. No external CLI, no macro. performance: no need to add a table to be parsed, the user_version field is at a fixed offset in the sqlite file format....

SQLite Pragma Cheatsheet for Performance and Consistency

SQL pragma are statements (like SELECT … or CREATE TABLE …) that change the database behaviors or call a special functions. This post is a short list of SQLite pragma I use in my projects built on SQLite, to get better performance and more consistency. TL;DR When Opening the DB PRAGMA journal_mode = wal; -- different implementation of the atomicity properties PRAGMA synchronous = normal; -- synchronise less often to the filesystem PRAGMA foreign_keys = on; -- check foreign key reference, slightly worst performance and check user_version....

May 7, 2021 · 5 min