v0.2.14
RustBox CI / rustbox (push) Canceled after 0s

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-02 15:34:49 +01:00
1 parent 12e0c99850
commit edda5fc9e4
42 files changed
+733 -122

No files matched your search

+9 -6
View File
@@ -1,6 +1,6 @@
# Database schemas and migrations
RustBox 0.2.13 keeps SQL, blob storage and search as independent concerns:
RustBox 0.2.14 keeps SQL, blob storage and search as independent concerns:
```text
database_backend = sqlite | mysql | pgsql
@@ -19,20 +19,23 @@ migrations/
│ ├── schema.sql
│ ├── V047__blob_keys_and_search_outbox.sql
│ ├── V048__folder_counter_generation.sql
│ └── V049__blob_delete_outbox.sql
│ ├── V049__blob_delete_outbox.sql
│ └── V050__compact_rows_and_signature_mode.sql
├── mysql/
│ ├── schema.sql
│ ├── V047__blob_keys_and_search_outbox.sql
│ ├── V048__folder_counter_generation.sql
│ └── V049__blob_delete_outbox.sql
│ ├── V049__blob_delete_outbox.sql
│ └── V050__compact_rows_and_signature_mode.sql
└── pgsql/
├── schema.sql
├── V047__blob_keys_and_search_outbox.sql
├── V048__folder_counter_generation.sql
└── V049__blob_delete_outbox.sql
├── V049__blob_delete_outbox.sql
└── V050__compact_rows_and_signature_mode.sql
```
Each `schema.sql` is the current complete schema for fresh installations. The historical compatibility baseline remains **V046**. RustBox 0.2.1 adds **V047**, which adds attachment SHA-256 metadata and the durable search outbox used by external indexing. RustBox 0.2.8 adds **V048**, which adds the monotonic `folders.counter_generation` used to reject stale IMAP counter writes even when the numeric counts temporarily return to an earlier value. RustBox 0.2.13 adds **V049**, the durable `blob_delete_outbox` used to retry physical object deletion after metadata is removed.
Each `schema.sql` is the current complete schema for fresh installations. The historical compatibility baseline remains **V046**. RustBox 0.2.1 adds **V047**, which adds attachment SHA-256 metadata and the durable search outbox used by external indexing. RustBox 0.2.8 adds **V048**, which adds the monotonic `folders.counter_generation` used to reject stale IMAP counter writes even when the numeric counts temporarily return to an earlier value. RustBox 0.2.13 adds **V049**, the durable `blob_delete_outbox` used to retry physical object deletion after metadata is removed. RustBox 0.2.14 adds **V050**, which stores the default-on compact wide-row preference and each identity's signature insertion mode (`silent` or `visible`).
Account data is isolated inside the selected physical database with a deterministic, collision-checked table prefix derived from the account hash. The `{{p}}` marker in tenant SQL is replaced by RustBox at provisioning/migration time. Sessions are global and therefore are not prefixed.
@@ -40,7 +43,7 @@ Account data is isolated inside the selected physical database with a determinis
Every schema-changing release must add the same logical migration for all supported SQL engines and register it in `src/db/pool.rs`. Do not update only `schema.sql`: fresh installs use the baseline while existing installations use the numbered migration path.
RustBox 0.2.13 adds runtime migration **V049** on SQLite, MySQL and PostgreSQL. **V050** is the next migration number.
RustBox 0.2.14 adds runtime migration **V050** on SQLite, MySQL and PostgreSQL. **V051** is the next migration number.
Redis and Redis Sentinel do not use SQL migrations.
@@ -0,0 +1,5 @@
ALTER TABLE {{p}}mail_preferences
ADD COLUMN compact_wide_rows BIGINT NOT NULL DEFAULT 1;
ALTER TABLE {{p}}identities
ADD COLUMN signature_insert_mode VARCHAR(16) NOT NULL DEFAULT 'silent';
+4 -2
View File
@@ -1,7 +1,7 @@
-- 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: V046. Current runtime schema: V049.
-- Squashed compatibility baseline: V046. Current runtime schema: V050.
-- RUSTBOX:GLOBAL-BEGIN
CREATE TABLE IF NOT EXISTS rustbox_accounts (
@@ -281,6 +281,7 @@ CREATE TABLE {{p}}identities (
signature_reply BIGINT NOT NULL DEFAULT 1,
signature_forward BIGINT NOT NULL DEFAULT 1,
signature_position TEXT NOT NULL DEFAULT ('above'),
signature_insert_mode VARCHAR(16) NOT NULL DEFAULT ('silent'),
pgp_fingerprint TEXT,
pgp_sign_default BIGINT NOT NULL DEFAULT 0,
pgp_encrypt_default BIGINT NOT NULL DEFAULT 0,
@@ -304,7 +305,8 @@ CREATE TABLE {{p}}mail_preferences (
default_sort TEXT NOT NULL DEFAULT ('date_desc'),
updated_at VARCHAR(64) NOT NULL DEFAULT (CAST(CURRENT_TIMESTAMP AS CHAR)),
flagged_on_top BIGINT NOT NULL DEFAULT 0,
sync_imap_keywords BIGINT NOT NULL DEFAULT 0
sync_imap_keywords BIGINT NOT NULL DEFAULT 0,
compact_wide_rows BIGINT NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE {{p}}meeting_templates (
@@ -0,0 +1,5 @@
ALTER TABLE {{p}}mail_preferences
ADD COLUMN compact_wide_rows BIGINT NOT NULL DEFAULT 1;
ALTER TABLE {{p}}identities
ADD COLUMN signature_insert_mode TEXT NOT NULL DEFAULT 'silent';
+4 -2
View File
@@ -1,7 +1,7 @@
-- 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: V046. Current runtime schema: V049.
-- Squashed compatibility baseline: V046. Current runtime schema: V050.
-- RUSTBOX:GLOBAL-BEGIN
CREATE TABLE IF NOT EXISTS rustbox_accounts (
@@ -283,6 +283,7 @@ CREATE TABLE {{p}}identities (
signature_reply BIGINT NOT NULL DEFAULT 1,
signature_forward BIGINT NOT NULL DEFAULT 1,
signature_position TEXT NOT NULL DEFAULT 'above',
signature_insert_mode TEXT NOT NULL DEFAULT 'silent',
pgp_fingerprint TEXT,
pgp_sign_default BIGINT NOT NULL DEFAULT 0,
pgp_encrypt_default BIGINT NOT NULL DEFAULT 0,
@@ -306,7 +307,8 @@ CREATE TABLE {{p}}mail_preferences (
default_sort TEXT NOT NULL DEFAULT 'date_desc',
updated_at TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP::text),
flagged_on_top BIGINT NOT NULL DEFAULT 0,
sync_imap_keywords BIGINT NOT NULL DEFAULT 0
sync_imap_keywords BIGINT NOT NULL DEFAULT 0,
compact_wide_rows BIGINT NOT NULL DEFAULT 1
);
CREATE TABLE {{p}}meeting_templates (
@@ -0,0 +1,5 @@
ALTER TABLE {{p}}mail_preferences
ADD COLUMN compact_wide_rows INTEGER NOT NULL DEFAULT 1;
ALTER TABLE {{p}}identities
ADD COLUMN signature_insert_mode TEXT NOT NULL DEFAULT 'silent';
+3 -3
View File
@@ -1,7 +1,7 @@
-- 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: V046. Current runtime schema: V049.
-- Squashed compatibility baseline: V046. Current runtime schema: V050.
-- RUSTBOX:GLOBAL-BEGIN
CREATE TABLE IF NOT EXISTS rustbox_accounts (
@@ -210,7 +210,7 @@ CREATE TABLE {{p}}identities (
is_default INTEGER NOT NULL DEFAULT 0,
created_at TEXT NOT NULL DEFAULT (datetime('now')),
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
reply_to TEXT NOT NULL DEFAULT '', bcc TEXT NOT NULL DEFAULT '', organization TEXT NOT NULL DEFAULT '', signature_text TEXT NOT NULL DEFAULT '', signature_new INTEGER NOT NULL DEFAULT 1, signature_reply INTEGER NOT NULL DEFAULT 1, signature_forward INTEGER NOT NULL DEFAULT 1, signature_position TEXT NOT NULL DEFAULT 'above', pgp_fingerprint TEXT, pgp_sign_default INTEGER NOT NULL DEFAULT 0, pgp_encrypt_default INTEGER NOT NULL DEFAULT 0, pgp_inline_default INTEGER NOT NULL DEFAULT 0);
reply_to TEXT NOT NULL DEFAULT '', bcc TEXT NOT NULL DEFAULT '', organization TEXT NOT NULL DEFAULT '', signature_text TEXT NOT NULL DEFAULT '', signature_new INTEGER NOT NULL DEFAULT 1, signature_reply INTEGER NOT NULL DEFAULT 1, signature_forward INTEGER NOT NULL DEFAULT 1, signature_position TEXT NOT NULL DEFAULT 'above', signature_insert_mode TEXT NOT NULL DEFAULT 'silent', pgp_fingerprint TEXT, pgp_sign_default INTEGER NOT NULL DEFAULT 0, pgp_encrypt_default INTEGER NOT NULL DEFAULT 0, pgp_inline_default INTEGER NOT NULL DEFAULT 0);
CREATE TABLE {{p}}known_addresses (
email TEXT NOT NULL,
@@ -229,7 +229,7 @@ CREATE TABLE {{p}}mail_preferences (
show_snippets INTEGER NOT NULL DEFAULT 1,
default_sort TEXT NOT NULL DEFAULT 'date_desc',
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
flagged_on_top INTEGER NOT NULL DEFAULT 0, sync_imap_keywords INTEGER NOT NULL DEFAULT 0);
flagged_on_top INTEGER NOT NULL DEFAULT 0, sync_imap_keywords INTEGER NOT NULL DEFAULT 0, compact_wide_rows INTEGER NOT NULL DEFAULT 1);
CREATE TABLE {{p}}meeting_templates (
id INTEGER PRIMARY KEY AUTOINCREMENT,