1.5 KiB
RustBox database schema and migrations
RustBox keeps one complete fresh-install schema per supported SQL backend:
sqlite/schema.sqlmysql/schema.sqlpgsql/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, default0/ disabled;mail_preferences.message_loading_mode, defaultpagination.
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:
- update all three complete
schema.sqlfiles; - add the same logical numbered migration for SQLite, MySQL and PostgreSQL;
- register that migration in
src/db/pool.rs; - extend the offline migration tests in
scripts/validate-release-static.py.