-- Initialize Schemas CREATE SCHEMA IF NOT EXISTS auth_schema; CREATE SCHEMA IF NOT EXISTS rbac_schema; CREATE SCHEMA IF NOT EXISTS tenant_schema; CREATE SCHEMA IF NOT EXISTS observability_schema; CREATE SCHEMA IF NOT EXISTS ai_flow_schema; CREATE SCHEMA IF NOT EXISTS domain_stock; CREATE SCHEMA IF NOT EXISTS domain_health; -- Enable extensions CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- Initial superuser (password: admin) INSERT INTO auth_schema.users (username, email, hashed_password, tenant_id, is_superuser) VALUES ('admin', 'admin@example.com', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYzS7eFKe4m', 1, true) ON CONFLICT (email) DO NOTHING; COMMENT ON DATABASE aiplatform IS 'AI Multi-Project Management Platform Database';