feat(federation): add schema columns for upload size mismatch tracking

Adds federation_status and federation_meta to attachments table, and
remote_max_upload_size to federation_peers, with idempotent migrations.
This commit is contained in:
Jannis Braun
2026-03-27 04:32:58 +01:00
parent c9c0acf2c4
commit b9e4c65927
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -616,6 +616,19 @@ export function runMigrations(db: Database.Database): void {
migrateGeneralizeOutbox(db);
// ─── Federation upload size mismatch columns ─────────────────────────────
try {
db.exec(`ALTER TABLE attachments ADD COLUMN federation_status TEXT`);
} catch { /* column already exists */ }
try {
db.exec(`ALTER TABLE attachments ADD COLUMN federation_meta TEXT`);
} catch { /* column already exists */ }
try {
db.exec(`ALTER TABLE federation_peers ADD COLUMN remote_max_upload_size INTEGER`);
} catch { /* column already exists */ }
console.log('Migrations complete.');
}