MicProtocol / scripts /init-databases.sql
Benaah's picture
Upload folder using huggingface_hub
059ec0d verified
Raw History Blame Contribute Delete
1.7 kB
-- ═══════════════════════════════════════════════════════════
-- MicProtocol - Database initialization
-- Creates one DB per self-hosted integration. The MicProtocol
-- API itself uses POSTGRES_DB (mirroring POSTGRES_USER) which is
-- created automatically by the postgres image; these scripts add
-- the rest.
-- ═══════════════════════════════════════════════════════════
-- Core extension used by MicProtocol itself.
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- pgvector is required by Chatwoot AND Formbricks. The image
-- pgvector/pgvector:pg16 ships the extension; just enable it.
CREATE EXTENSION IF NOT EXISTS vector;
-- ─── MicProtocol integration DBs (each owns its own schema) ─
CREATE DATABASE chatwoot;
CREATE DATABASE calcom;
CREATE DATABASE documenso;
CREATE DATABASE formbricks;
CREATE DATABASE listmonk;
CREATE DATABASE umami;
-- ─── Per-DB extensions ─────────────────────────────────────
-- pgvector has to be enabled inside each database that needs it.
\c chatwoot
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
\c formbricks
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
\c calcom
CREATE EXTENSION IF NOT EXISTS pgcrypto;
\c documenso
CREATE EXTENSION IF NOT EXISTS pgcrypto;
\c umami
CREATE EXTENSION IF NOT EXISTS pgcrypto;
\c listmonk
CREATE EXTENSION IF NOT EXISTS pgcrypto;