trading-platform-database-v2/seeds/prod/market_data/01-tickers.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

74 lines
1.9 KiB
SQL

-- =====================================================
-- SEED DATA - Schema Market Data (Production)
-- =====================================================
-- Project: OrbiQuant IA (Trading Platform)
-- Table: market_data.tickers
-- Description: Market data tickers matching trading symbols
-- Date: 2026-01-27
-- Note: The DDL (01-tickers.sql) contains inline seeds for
-- the same 6 tickers. This seed file serves as the
-- canonical source and uses ON CONFLICT to be idempotent.
-- =====================================================
SET search_path TO market_data, public;
-- =====================================================
-- 1. MARKET DATA TICKERS (6 tickers)
-- =====================================================
INSERT INTO market_data.tickers (
symbol, name,
asset_type, base_currency, quote_currency,
is_ml_enabled, supported_timeframes,
polygon_ticker,
is_active
) VALUES
(
'XAUUSD', 'Gold / US Dollar',
'commodity', 'XAU', 'USD',
true, ARRAY['5m', '15m', '1h'],
'C:XAUUSD',
true
),
(
'EURUSD', 'Euro / US Dollar',
'forex', 'EUR', 'USD',
true, ARRAY['5m', '15m'],
'C:EURUSD',
true
),
(
'GBPUSD', 'British Pound / US Dollar',
'forex', 'GBP', 'USD',
true, ARRAY['5m', '15m'],
'C:GBPUSD',
true
),
(
'USDJPY', 'US Dollar / Japanese Yen',
'forex', 'USD', 'JPY',
true, ARRAY['5m', '15m'],
'C:USDJPY',
true
),
(
'AUDUSD', 'Australian Dollar / US Dollar',
'forex', 'AUD', 'USD',
true, ARRAY['5m', '15m'],
'C:AUDUSD',
true
),
(
'BTCUSD', 'Bitcoin / US Dollar',
'crypto', 'BTC', 'USD',
true, ARRAY['5m', '15m', '1h'],
'X:BTCUSD',
true
)
ON CONFLICT (symbol) DO NOTHING;
-- =====================================================
-- VERIFICATION
-- =====================================================
SELECT 'market_data.tickers seed:' AS info, COUNT(*) AS count FROM market_data.tickers;