1 parent
3b9110c8c8
commit
beae94e932
42 files changed
+2518
-274
No files matched your search
+17
-12
@@ -8,28 +8,31 @@ RustBox keeps one complete fresh-install schema per supported SQL backend:
|
||||
|
||||
## 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.
|
||||
The consolidated compatibility baseline is **V052** (RustBox 0.2.23). Historical migrations up to and including V052 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.
|
||||
- V047-V050 — attachment/search-outbox changes, folder counter generation, blob deletion outbox, compact-row and signature preferences (consolidated in 0.2.16);
|
||||
- V051 — `display_preferences.adaptive_email_colors` (default `0`) and `mail_preferences.message_loading_mode` (default `pagination`);
|
||||
- V052 — the `snoozed_messages` table used by Snooze (local cache state only, no IMAP side effects, no foreign keys).
|
||||
|
||||
## V051 — RustBox 0.2.16
|
||||
Databases older than V052 must first be upgraded with a RustBox release that can reach V052. RustBox 0.2.22 accepts V050 and V051 databases and migrates them to V052, so a tenant that has not logged in since an older release should be opened once with 0.2.22 before upgrading. Tenants below the baseline are refused with an explicit error instead of being partially migrated.
|
||||
|
||||
V051 adds the preferences introduced in 0.2.16:
|
||||
The MySQL fresh schema now declares `mail_preferences.message_loading_mode` with an expression default (`DEFAULT ('pagination')`); MySQL rejects literal defaults on `TEXT` columns.
|
||||
|
||||
- `display_preferences.adaptive_email_colors`, default `0` / disabled;
|
||||
- `mail_preferences.message_loading_mode`, default `pagination`.
|
||||
## V053 — RustBox 0.2.23
|
||||
|
||||
`mail_preferences.messages_per_page` remains `300` by default. Supported message loading modes are `pagination`, `progressive` and `all`.
|
||||
V053 adds two appearance columns to `display_preferences`.
|
||||
|
||||
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.
|
||||
`skin_depth`, default `standard`, controls how far a predefined interface style may reshape the interface:
|
||||
|
||||
## V052 — RustBox 0.2.22
|
||||
- `colors` — only the style's palette is applied; layout, shapes and typography come from your own appearance settings;
|
||||
- `standard` — palette plus the style's fixed layout preferences (the behavior of earlier releases);
|
||||
- `immersive` — additionally applies the style's structural design tokens: typography, control and avatar shapes, floating panes, app-bar treatment, selection markers and backdrop.
|
||||
|
||||
V052 adds the `snoozed_messages` table used by the Snooze feature introduced in 0.2.22: a message can be hidden from its folder listing in the client until a chosen wake time, without being moved on the real IMAP server. The table is local cache state only (no IMAP side effects) and has no foreign keys, matching `message_tags`' existing exemption from forward-referencing foreign keys in the MySQL/PostgreSQL schemas.
|
||||
`skin_gradients`, default `0` / off, is a separate switch for every gradient a style uses (backdrops, app bars, buttons, Roundcube Classic bevels). When off, each style falls back to flat colors defined next to its gradient.
|
||||
|
||||
Fresh installations already contain `snoozed_messages` in `schema.sql` and are registered at the latest schema version. Existing V051 tenants execute `V052__snooze.sql`.
|
||||
Fresh installations already contain both columns in `schema.sql` and are registered at the latest schema version. Existing V052 tenants execute `V053__skin_depth_and_gradients.sql`.
|
||||
|
||||
The next migration number is **V053**.
|
||||
The next migration number is **V054**.
|
||||
|
||||
## Migration rules
|
||||
|
||||
@@ -39,3 +42,5 @@ Any future schema-changing release must:
|
||||
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`.
|
||||
|
||||
On MySQL, `TEXT` columns must use expression defaults such as `DEFAULT ('value')`.
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN adaptive_email_colors BIGINT NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE {{p}}mail_preferences
|
||||
ADD COLUMN message_loading_mode TEXT NOT NULL DEFAULT 'pagination';
|
||||
@@ -1,9 +0,0 @@
|
||||
CREATE TABLE {{p}}snoozed_messages (
|
||||
id VARCHAR(64) PRIMARY KEY,
|
||||
message_uid BIGINT NOT NULL,
|
||||
message_folder VARCHAR(512) NOT NULL,
|
||||
wake_at BIGINT NOT NULL,
|
||||
created_at VARCHAR(64) NOT NULL DEFAULT (CAST(CURRENT_TIMESTAMP AS CHAR)),
|
||||
UNIQUE KEY idx_snoozed_messages_unique (message_uid, message_folder),
|
||||
INDEX idx_snoozed_messages_wake (wake_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN skin_depth TEXT NOT NULL DEFAULT ('standard'),
|
||||
ADD COLUMN skin_gradients BIGINT NOT NULL DEFAULT 0;
|
||||
@@ -1,13 +1,13 @@
|
||||
-- RustBox 0.2.0 MySQL schema.
|
||||
-- One physical database contains global sessions plus isolated per-account tables.
|
||||
-- Application tables are materialized by replacing {{p}} with a collision-checked prefix.
|
||||
-- Squashed compatibility baseline: V050; current schema: V052.
|
||||
-- Squashed compatibility baseline: V052; current schema: V053.
|
||||
|
||||
-- RUSTBOX:GLOBAL-BEGIN
|
||||
CREATE TABLE IF NOT EXISTS rustbox_accounts (
|
||||
user_hash VARCHAR(128) PRIMARY KEY,
|
||||
table_prefix VARCHAR(64) NOT NULL UNIQUE,
|
||||
schema_version BIGINT NOT NULL DEFAULT 50,
|
||||
schema_version BIGINT NOT NULL DEFAULT 52,
|
||||
created_at VARCHAR(64) NOT NULL DEFAULT (CAST(CURRENT_TIMESTAMP AS CHAR)),
|
||||
updated_at VARCHAR(64) NOT NULL DEFAULT (CAST(CURRENT_TIMESTAMP AS CHAR))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
@@ -177,7 +177,9 @@ CREATE TABLE {{p}}display_preferences (
|
||||
spellcheck_enabled BIGINT NOT NULL DEFAULT 1,
|
||||
interface_skin TEXT NOT NULL DEFAULT ('rustbox'),
|
||||
preset_scale_unlocked BIGINT NOT NULL DEFAULT 0,
|
||||
adaptive_email_colors BIGINT NOT NULL DEFAULT 0
|
||||
adaptive_email_colors BIGINT NOT NULL DEFAULT 0,
|
||||
skin_depth TEXT NOT NULL DEFAULT ('standard'),
|
||||
skin_gradients BIGINT NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE {{p}}draft_attachments (
|
||||
@@ -297,7 +299,7 @@ CREATE TABLE {{p}}known_addresses (
|
||||
CREATE TABLE {{p}}mail_preferences (
|
||||
id BIGINT PRIMARY KEY,
|
||||
messages_per_page BIGINT NOT NULL DEFAULT 300,
|
||||
message_loading_mode TEXT NOT NULL DEFAULT 'pagination',
|
||||
message_loading_mode TEXT NOT NULL DEFAULT ('pagination'),
|
||||
mark_read_delay_ms BIGINT NOT NULL DEFAULT 0,
|
||||
remote_images TEXT NOT NULL DEFAULT ('ask'),
|
||||
preferred_body TEXT NOT NULL DEFAULT ('auto'),
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN adaptive_email_colors BIGINT NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE {{p}}mail_preferences
|
||||
ADD COLUMN message_loading_mode TEXT NOT NULL DEFAULT 'pagination';
|
||||
@@ -1,10 +0,0 @@
|
||||
CREATE TABLE {{p}}snoozed_messages (
|
||||
id TEXT PRIMARY KEY,
|
||||
message_uid BIGINT NOT NULL,
|
||||
message_folder TEXT NOT NULL,
|
||||
wake_at BIGINT NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP::text),
|
||||
UNIQUE (message_uid, message_folder)
|
||||
);
|
||||
|
||||
CREATE INDEX {{p}}idx_snoozed_messages_wake ON {{p}}snoozed_messages(wake_at);
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN skin_depth TEXT NOT NULL DEFAULT 'standard',
|
||||
ADD COLUMN skin_gradients BIGINT NOT NULL DEFAULT 0;
|
||||
@@ -1,13 +1,13 @@
|
||||
-- RustBox 0.2.0 PostgreSQL schema.
|
||||
-- One physical database contains global sessions plus isolated per-account tables.
|
||||
-- Application tables are materialized by replacing {{p}} with a collision-checked prefix.
|
||||
-- Squashed compatibility baseline: V050; current schema: V052.
|
||||
-- Squashed compatibility baseline: V052; current schema: V053.
|
||||
|
||||
-- RUSTBOX:GLOBAL-BEGIN
|
||||
CREATE TABLE IF NOT EXISTS rustbox_accounts (
|
||||
user_hash VARCHAR(128) PRIMARY KEY,
|
||||
table_prefix VARCHAR(64) NOT NULL UNIQUE,
|
||||
schema_version BIGINT NOT NULL DEFAULT 50,
|
||||
schema_version BIGINT NOT NULL DEFAULT 52,
|
||||
created_at TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP::text),
|
||||
updated_at TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP::text)
|
||||
);
|
||||
@@ -177,7 +177,9 @@ CREATE TABLE {{p}}display_preferences (
|
||||
spellcheck_enabled BIGINT NOT NULL DEFAULT 1,
|
||||
interface_skin TEXT NOT NULL DEFAULT 'rustbox',
|
||||
preset_scale_unlocked BIGINT NOT NULL DEFAULT 0,
|
||||
adaptive_email_colors BIGINT NOT NULL DEFAULT 0
|
||||
adaptive_email_colors BIGINT NOT NULL DEFAULT 0,
|
||||
skin_depth TEXT NOT NULL DEFAULT 'standard',
|
||||
skin_gradients BIGINT NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE {{p}}draft_attachments (
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN adaptive_email_colors INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE {{p}}mail_preferences
|
||||
ADD COLUMN message_loading_mode TEXT NOT NULL DEFAULT 'pagination';
|
||||
@@ -1,10 +0,0 @@
|
||||
CREATE TABLE {{p}}snoozed_messages (
|
||||
id TEXT PRIMARY KEY,
|
||||
message_uid INTEGER NOT NULL,
|
||||
message_folder TEXT NOT NULL,
|
||||
wake_at INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
UNIQUE (message_uid, message_folder)
|
||||
);
|
||||
|
||||
CREATE INDEX {{p}}idx_snoozed_messages_wake ON {{p}}snoozed_messages(wake_at);
|
||||
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN skin_depth TEXT NOT NULL DEFAULT 'standard';
|
||||
|
||||
ALTER TABLE {{p}}display_preferences
|
||||
ADD COLUMN skin_gradients INTEGER NOT NULL DEFAULT 0;
|
||||
@@ -1,13 +1,13 @@
|
||||
-- RustBox 0.2.0 SQLite schema.
|
||||
-- One physical database contains global sessions plus isolated per-account tables.
|
||||
-- Application tables are materialized from the tenant section by replacing {{p}}.
|
||||
-- Squashed compatibility baseline: V050; current schema: V052.
|
||||
-- Squashed compatibility baseline: V052; current schema: V053.
|
||||
|
||||
-- RUSTBOX:GLOBAL-BEGIN
|
||||
CREATE TABLE IF NOT EXISTS rustbox_accounts (
|
||||
user_hash TEXT PRIMARY KEY NOT NULL,
|
||||
table_prefix TEXT NOT NULL UNIQUE,
|
||||
schema_version INTEGER NOT NULL DEFAULT 50,
|
||||
schema_version INTEGER NOT NULL DEFAULT 52,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
@@ -122,7 +122,7 @@ CREATE TABLE {{p}}display_preferences (
|
||||
theme TEXT NOT NULL DEFAULT 'system',
|
||||
language TEXT NOT NULL DEFAULT 'en',
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
compose_format TEXT NOT NULL DEFAULT 'html', deep_index BOOLEAN NOT NULL DEFAULT 0, animation_mode TEXT NULL, preview_pane TEXT NOT NULL DEFAULT 'right', ui_scale TEXT NOT NULL DEFAULT 'normal', color_preset TEXT NOT NULL DEFAULT 'sage', accent_color TEXT NOT NULL DEFAULT '#6f9c86', font_family TEXT NOT NULL DEFAULT 'system', font_size INTEGER NOT NULL DEFAULT 13, row_height INTEGER NOT NULL DEFAULT 58, folder_pane_width INTEGER NOT NULL DEFAULT 228, message_pane_width INTEGER NOT NULL DEFAULT 420, border_radius INTEGER NOT NULL DEFAULT 4, contrast TEXT NOT NULL DEFAULT 'normal', show_avatars INTEGER NOT NULL DEFAULT 1, show_attachment_icons INTEGER NOT NULL DEFAULT 1, show_flags INTEGER NOT NULL DEFAULT 1, reduce_motion INTEGER NOT NULL DEFAULT 0, date_format TEXT NOT NULL DEFAULT 'locale', time_format TEXT NOT NULL DEFAULT 'locale', background_color TEXT NOT NULL DEFAULT '#121513', panel_color TEXT NOT NULL DEFAULT '#181c19', text_color TEXT NOT NULL DEFAULT '#edf0ec', compose_autosave_ms INTEGER NOT NULL DEFAULT 3000, default_priority TEXT NOT NULL DEFAULT 'normal', request_mdn_default INTEGER NOT NULL DEFAULT 0, attachment_reminder INTEGER NOT NULL DEFAULT 1, icon_size INTEGER NOT NULL DEFAULT 18, toolbar_density TEXT NOT NULL DEFAULT 'normal', sidebar_item_height INTEGER NOT NULL DEFAULT 29, reader_max_width INTEGER NOT NULL DEFAULT 0, composer_width INTEGER NOT NULL DEFAULT 900, selection_color TEXT NOT NULL DEFAULT '#28352e', unread_font_weight INTEGER NOT NULL DEFAULT 730, unread_badge_style TEXT NOT NULL DEFAULT 'dot', compact_headers INTEGER NOT NULL DEFAULT 0, show_borders INTEGER NOT NULL DEFAULT 1, scrollbar_density TEXT NOT NULL DEFAULT 'thin', monochrome INTEGER NOT NULL DEFAULT 0, folder_background TEXT NOT NULL DEFAULT '', message_background TEXT NOT NULL DEFAULT '', reader_background TEXT NOT NULL DEFAULT '', compose_font_family TEXT NOT NULL DEFAULT 'system', reply_position TEXT NOT NULL DEFAULT 'above', quote_style TEXT NOT NULL DEFAULT 'standard', forward_mode TEXT NOT NULL DEFAULT 'inline', spellcheck_enabled INTEGER NOT NULL DEFAULT 1, interface_skin TEXT NOT NULL DEFAULT 'rustbox', preset_scale_unlocked INTEGER NOT NULL DEFAULT 0, adaptive_email_colors INTEGER NOT NULL DEFAULT 0);
|
||||
compose_format TEXT NOT NULL DEFAULT 'html', deep_index BOOLEAN NOT NULL DEFAULT 0, animation_mode TEXT NULL, preview_pane TEXT NOT NULL DEFAULT 'right', ui_scale TEXT NOT NULL DEFAULT 'normal', color_preset TEXT NOT NULL DEFAULT 'sage', accent_color TEXT NOT NULL DEFAULT '#6f9c86', font_family TEXT NOT NULL DEFAULT 'system', font_size INTEGER NOT NULL DEFAULT 13, row_height INTEGER NOT NULL DEFAULT 58, folder_pane_width INTEGER NOT NULL DEFAULT 228, message_pane_width INTEGER NOT NULL DEFAULT 420, border_radius INTEGER NOT NULL DEFAULT 4, contrast TEXT NOT NULL DEFAULT 'normal', show_avatars INTEGER NOT NULL DEFAULT 1, show_attachment_icons INTEGER NOT NULL DEFAULT 1, show_flags INTEGER NOT NULL DEFAULT 1, reduce_motion INTEGER NOT NULL DEFAULT 0, date_format TEXT NOT NULL DEFAULT 'locale', time_format TEXT NOT NULL DEFAULT 'locale', background_color TEXT NOT NULL DEFAULT '#121513', panel_color TEXT NOT NULL DEFAULT '#181c19', text_color TEXT NOT NULL DEFAULT '#edf0ec', compose_autosave_ms INTEGER NOT NULL DEFAULT 3000, default_priority TEXT NOT NULL DEFAULT 'normal', request_mdn_default INTEGER NOT NULL DEFAULT 0, attachment_reminder INTEGER NOT NULL DEFAULT 1, icon_size INTEGER NOT NULL DEFAULT 18, toolbar_density TEXT NOT NULL DEFAULT 'normal', sidebar_item_height INTEGER NOT NULL DEFAULT 29, reader_max_width INTEGER NOT NULL DEFAULT 0, composer_width INTEGER NOT NULL DEFAULT 900, selection_color TEXT NOT NULL DEFAULT '#28352e', unread_font_weight INTEGER NOT NULL DEFAULT 730, unread_badge_style TEXT NOT NULL DEFAULT 'dot', compact_headers INTEGER NOT NULL DEFAULT 0, show_borders INTEGER NOT NULL DEFAULT 1, scrollbar_density TEXT NOT NULL DEFAULT 'thin', monochrome INTEGER NOT NULL DEFAULT 0, folder_background TEXT NOT NULL DEFAULT '', message_background TEXT NOT NULL DEFAULT '', reader_background TEXT NOT NULL DEFAULT '', compose_font_family TEXT NOT NULL DEFAULT 'system', reply_position TEXT NOT NULL DEFAULT 'above', quote_style TEXT NOT NULL DEFAULT 'standard', forward_mode TEXT NOT NULL DEFAULT 'inline', spellcheck_enabled INTEGER NOT NULL DEFAULT 1, interface_skin TEXT NOT NULL DEFAULT 'rustbox', preset_scale_unlocked INTEGER NOT NULL DEFAULT 0, adaptive_email_colors INTEGER NOT NULL DEFAULT 0, skin_depth TEXT NOT NULL DEFAULT 'standard', skin_gradients INTEGER NOT NULL DEFAULT 0);
|
||||
|
||||
CREATE TABLE {{p}}draft_attachments (
|
||||
id TEXT PRIMARY KEY,
|
||||
|
||||
Reference in new issue
Block a user