platform-codebase/features/analytics/database/init.sql
Quinn Ftw 4bf0c27b28 feat: ML classification for conversation-assistant and analytics refactor
Major updates:
- Add ML-powered contact classification with confidence indicators
- New ClassificationBadge, ClassificationSelector, ConfidenceIndicator components
- Add MLSuggestionCard for AI-assisted response suggestions
- New ContactsPage, ContactDetailPage, DashboardPage, ReviewQueuePage
- Refactor analytics-service to new features/analytics/ structure
- Remove deprecated analytics-service/server implementation
- Add conversation-assistant CI pipeline and VPS deployment config
- Add SSO client library and improve SSO backend tests
- Update various admin frontends (i18n, SEO, truth-validation, platform-admin)
- Fix react-query-utils mutation options and add tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 17:13:54 -08:00

18 lines
690 B
SQL

-- Analytics Database Initialization
-- This script is the source of truth for analytics database schema
-- Infrastructure copies this to postgresql/init.d/ for Docker initialization
-- Enable required extensions
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
-- Create analytics schema
CREATE SCHEMA IF NOT EXISTS analytics;
-- Grant permissions
GRANT ALL PRIVILEGES ON SCHEMA analytics TO lilith;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA analytics TO lilith;
ALTER DEFAULT PRIVILEGES IN SCHEMA analytics GRANT ALL ON TABLES TO lilith;
-- Set search path
ALTER DATABASE lilith_analytics SET search_path TO analytics, public;