This commit is contained in:
Mateusz Gruszczyński committed 2026-10-31 14:36:07 +01:00
1 parent fc81ecafd6
commit dc57aa7089
89 files changed
+5290 -1551

No files matched your search

+21 -2
View File
@@ -1,7 +1,7 @@
-- RustBox 0.1.2 PostgreSQL schema.
-- 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.
-- Baseline application schema version: 46. Future migrations start at V047.
-- Squashed compatibility baseline: V046. Current runtime schema: V047.
-- RUSTBOX:GLOBAL-BEGIN
CREATE TABLE IF NOT EXISTS rustbox_accounts (
@@ -186,9 +186,28 @@ CREATE TABLE {{p}}draft_attachments (
content_type TEXT NOT NULL,
size BIGINT NOT NULL,
file_path TEXT NOT NULL,
checksum_sha256 TEXT,
created_at TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP::text)
);
CREATE TABLE {{p}}search_outbox (
id TEXT PRIMARY KEY,
generation TEXT NOT NULL,
event_type TEXT NOT NULL,
message_uid BIGINT NOT NULL,
folder TEXT NOT NULL,
payload TEXT,
attempts BIGINT NOT NULL DEFAULT 0,
available_at BIGINT NOT NULL DEFAULT 0,
claimed_until BIGINT NOT NULL DEFAULT 0,
dead_letter BIGINT NOT NULL DEFAULT 0,
last_error TEXT,
created_at BIGINT NOT NULL,
updated_at BIGINT NOT NULL
);
CREATE INDEX {{p}}idx_search_outbox_ready ON {{p}}search_outbox(dead_letter, available_at, claimed_until, updated_at);
CREATE TABLE {{p}}drafts (
id TEXT PRIMARY KEY,
to_addresses TEXT NOT NULL DEFAULT '',