Files
RustBox/migrations/README.md
T
Mateusz Gruszczyński dbe7103687
RustBox CI / rustbox (push) Canceled after 0s
v0.2.16
2026-11-02 23:32:23 +01:00

1.5 KiB

RustBox database schema and migrations

RustBox keeps one complete fresh-install schema per supported SQL backend:

  • sqlite/schema.sql
  • mysql/schema.sql
  • pgsql/schema.sql

Compatibility baseline

The consolidated compatibility baseline is V050. Historical migrations V047-V050 are already represented by the complete schema.sql files and are intentionally not shipped as standalone runtime migrations in this source tree.

Databases older than V050 must first be upgraded with a RustBox release that can reach V050. RustBox 0.2.16 accepts V050 databases and migrates them forward normally.

V051 — RustBox 0.2.16

V051 adds the preferences introduced in 0.2.16:

  • display_preferences.adaptive_email_colors, default 0 / disabled;
  • mail_preferences.message_loading_mode, default pagination.

mail_preferences.messages_per_page remains 300 by default. Supported message loading modes are pagination, progressive and all.

Fresh installations already contain the V051 columns in schema.sql and are registered at the latest schema version. Existing V050 tenants execute V051__adaptive_email_colors_and_message_loading_mode.sql before application queries use the new columns.

The next migration number is V052.

Migration rules

Any future schema-changing release must:

  1. update all three complete schema.sql files;
  2. add the same logical numbered migration for SQLite, MySQL and PostgreSQL;
  3. register that migration in src/db/pool.rs;
  4. extend the offline migration tests in scripts/validate-release-static.py.