TeamVis Self-Host-Bundle v0.31.0

This commit is contained in:
TeamVis Release
2026-06-25 16:38:31 +02:00
commit 717325742d
68 changed files with 3762 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env node
// bundle-migrations.mjs — Bündelt alle SQL-Migrationen in EINE Datei.
//
// Bei einer frischen Instanz ohne supabase-CLI/psql-Zugang ist das der
// schnellste Weg: dieses Bündel einmal in den Supabase-Studio-SQL-Editor
// einfügen und ausführen. Die Migrationen sind so geschrieben, dass sie
// idempotent genug für einen Erst-Lauf auf leerer DB sind.
//
// Aufruf:
// node scripts/bundle-migrations.mjs > /tmp/teamvis-schema.sql
// # dann /tmp/teamvis-schema.sql in Supabase Studio einfügen + ausführen
import { readdirSync, readFileSync } from "node:fs";
const dir = new URL("../supabase/migrations/", import.meta.url);
const files = readdirSync(dir)
.filter((f) => f.endsWith(".sql"))
.sort();
let out = `-- TeamVis Schema-Bündel (${files.length} Migrationen)\n`;
out += `-- Erzeugt: ${new Date().toISOString()}\n`;
out += `-- Reihenfolge entspricht der Datei-Nummerierung.\n`;
for (const f of files) {
const sql = readFileSync(new URL(f, dir), "utf8");
out += `\n\n-- ════════════════════════════════════════════════════════\n`;
out += `-- ${f}\n`;
out += `-- ════════════════════════════════════════════════════════\n\n`;
out += sql.trimEnd() + "\n";
}
process.stdout.write(out);