trading-platform-database-v2/ddl/00-extensions.sql
Adrian Flores Cortes 2a6d8367d8 feat: Update DDL schemas and add new structures
DDL updates:
- Update extensions and schemas configuration
- Add sessions table for auth schema
- Update education schema (videos, install/uninstall scripts)
- Add backtest_runs and llm_signals tables for ML schema

Scripts:
- Update database creation and migration scripts
- Add DDL validation script

New:
- Add migrations directory structure
- Add production seeds for auth, investment, market_data, trading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:24:23 -06:00

30 lines
1.2 KiB
SQL

-- ============================================================================
-- OrbiQuant IA - Trading Platform
-- File: 00-extensions.sql
-- Description: PostgreSQL extensions required globally
-- ============================================================================
-- UUID generation extension
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Cryptographic functions for password hashing and token generation
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
-- Network address types and functions
CREATE EXTENSION IF NOT EXISTS "citext";
-- Full text search
CREATE EXTENSION IF NOT EXISTS "unaccent";
-- Trigram similarity for fuzzy text matching
CREATE EXTENSION IF NOT EXISTS "pg_trgm";
-- Vector similarity search for LLM embeddings (pgvector)
CREATE EXTENSION IF NOT EXISTS "vector";
COMMENT ON EXTENSION "uuid-ossp" IS 'UUID generation functions';
COMMENT ON EXTENSION "pgcrypto" IS 'Cryptographic functions for secure password and token handling';
COMMENT ON EXTENSION "citext" IS 'Case-insensitive text type for email addresses';
COMMENT ON EXTENSION "unaccent" IS 'Text search dictionary that removes accents';
COMMENT ON EXTENSION "pg_trgm" IS 'Trigram matching for similarity searches';