mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 01:01:09 +02:00
Mirrors the frontend unification (single IndexedDB) on the backend. All services now use pgSchema() for isolation within one shared database, enabling cross-schema JOINs, simplified ops, and zero DB setup for new apps. - Migrate 7 services from pgTable() to pgSchema(): mana-user (usr), mana-media (media), todo, traces, presi, uload, cards - Update all DATABASE_URLs in .env.development, docker-compose, configs - Rewrite init-db scripts for 2 databases + 12 schemas - Rewrite setup-databases.sh for consolidated architecture - Update shared-drizzle-config default to mana_platform - Update CLAUDE.md with new database architecture docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
552 B
SQL
15 lines
552 B
SQL
-- Create additional databases for services
|
|
-- Note: mana_platform is already created as POSTGRES_DB by Docker
|
|
|
|
-- Sync database: separate for I/O isolation (write-heavy, append-only)
|
|
CREATE DATABASE mana_sync;
|
|
|
|
-- Infrastructure databases (external tools)
|
|
CREATE DATABASE glitchtip;
|
|
CREATE DATABASE umami;
|
|
|
|
-- Grant privileges
|
|
GRANT ALL PRIVILEGES ON DATABASE mana_platform TO manacore;
|
|
GRANT ALL PRIVILEGES ON DATABASE mana_sync TO manacore;
|
|
GRANT ALL PRIVILEGES ON DATABASE glitchtip TO manacore;
|
|
GRANT ALL PRIVILEGES ON DATABASE umami TO manacore;
|