-- Migration: Pivot Pitch Deck to Maschinen- und Anlagenbau
-- Date: 2026-02-17

BEGIN;

-- 1. Company tagline/mission
UPDATE pitch_company SET
  tagline_de = 'Compliance & Code-Security fuer den Maschinenbau',
  tagline_en = 'Compliance & Code Security for Machine Manufacturers',
  mission_de = 'Wir machen Maschinenbauer compliant — nicht nur organisatorisch, sondern auch fuer ihre eigene Software. Unser BSI-zertifiziertes 1000B LLM scannt Code, bewertet Risiken und dokumentiert Compliance automatisch.',
  mission_en = 'We make machine manufacturers compliant — not just organizationally, but also for their own software. Our BSI-certified 1000B LLM scans code, assesses risks and documents compliance automatically.'
WHERE id = 1;

-- 2. Market: TAM/SAM/SOM
UPDATE pitch_market SET
  label = 'Global Compliance & DevSecOps Software (Manufacturing)',
  value_eur = 8700000000,
  growth_rate_pct = 16.2,
  source = 'Grand View Research + MarketsAndMarkets 2024'
WHERE market_segment = 'TAM';

UPDATE pitch_market SET
  label = 'DACH Maschinenbau Compliance & Security',
  value_eur = 850000000,
  growth_rate_pct = 19.5,
  source = 'VDMA / Statista / IDC 2024'
WHERE market_segment = 'SAM';

UPDATE pitch_market SET
  label = 'DACH Maschinenbauer mit Eigenentwicklung (10% VDMA)',
  value_eur = 7200000,
  growth_rate_pct = 25.0,
  source = 'VDMA (5.000 DACH) x 10% x 14.400 EUR/Jahr'
WHERE market_segment = 'SOM';

-- 3. Features: Add differentiator rows
INSERT INTO pitch_features (feature_name_de, feature_name_en, category, breakpilot, proliance, dataguard, heydata, is_differentiator, sort_order) VALUES
('Firmware/Code-Scanning', 'Firmware/Code Scanning', 'security', true, false, false, false, true, 15),
('Software-Risikoanalyse (CRA)', 'Software Risk Assessment (CRA)', 'security', true, false, false, false, true, 16),
('DevSecOps Pipeline Integration', 'DevSecOps Pipeline Integration', 'security', true, false, false, false, true, 17),
('Cyber Resilience Act Compliance', 'Cyber Resilience Act Compliance', 'compliance', true, false, false, false, true, 18)
ON CONFLICT DO NOTHING;

-- 4. Competitors: Update weaknesses
UPDATE pitch_competitors SET
  weaknesses = '["Nur Cloud", "Keine eigene KI", "Kein Code-Scanning", "Keine Firmware-Analyse", "Kein Self-Hosting"]'
WHERE name = 'Proliance 360';

UPDATE pitch_competitors SET
  weaknesses = '["Teuer", "Cloud-only", "Keine Code-Security", "Keine Firmware-Compliance", "Lock-in Effekt"]'
WHERE name = 'DataGuard';

UPDATE pitch_competitors SET
  weaknesses = '["Begrenzte Features", "Keine KI", "Kein Code-Scanning", "Nur Cloud", "Kein Enterprise"]'
WHERE name = 'heyData';

-- 5. Products: Update capabilities for Maschinenbau
UPDATE pitch_products SET
  llm_capability_de = 'Lokale Code-Analyse, Compliance-Dokumente, Basis-Schwachstellenscan. Vorarbeit fuer das Cloud-LLM.',
  llm_capability_en = 'Local code analysis, compliance documents, basic vulnerability scan. Preprocessing for cloud LLM.',
  features_de = '["DSGVO-Compliance", "AI Act Dokumentation", "Basis-Code-Scanning", "E-Mail-Support"]',
  features_en = '["GDPR Compliance", "AI Act Documentation", "Basic Code Scanning", "Email Support"]'
WHERE name = 'ComplAI Mini';

UPDATE pitch_products SET
  llm_capability_de = 'Erweiterte Code-Analyse, Firmware-Scanning, Multi-Repository-Verarbeitung. Lokale Vorarbeit + Cloud-LLM fuer Fixes.',
  llm_capability_en = 'Advanced code analysis, firmware scanning, multi-repository processing. Local preprocessing + cloud LLM for fixes.',
  features_de = '["Alles aus Mini", "Firmware-Scanning", "DevSecOps Integration", "Priority Support", "CRA-Dokumentation"]',
  features_en = '["Everything in Mini", "Firmware Scanning", "DevSecOps Integration", "Priority Support", "CRA Documentation"]'
WHERE name = 'ComplAI Studio';

UPDATE pitch_products SET
  llm_capability_de = 'BSI-zertifiziertes 1000B Cloud-LLM: scannt, behebt und dokumentiert Schwachstellen in Firmware und Software automatisch. Fuer alle Mitarbeiter nutzbar.',
  llm_capability_en = 'BSI-certified 1000B cloud LLM: scans, fixes and documents vulnerabilities in firmware and software automatically. Available for all employees.',
  features_de = '["Alles aus Studio", "Vollautonome Code-Security", "Risikoanalysen fuer Eigenentwicklungen", "24/7 Verfuegbarkeit", "SLA 99.9%", "Dedicated Account Manager"]',
  features_en = '["Everything in Studio", "Fully Autonomous Code Security", "Risk Assessments for In-House Development", "24/7 Availability", "SLA 99.9%", "Dedicated Account Manager"]'
WHERE name = 'ComplAI Cloud';

-- 6. Financials: Adjust customer projections (max ~380 by 2030)
UPDATE pitch_financials SET customers_count = 5, revenue_eur = 72000, mrr_eur = 6000, arr_eur = 72000 WHERE year = 2026;
UPDATE pitch_financials SET customers_count = 30, revenue_eur = 430000, mrr_eur = 36000, arr_eur = 432000 WHERE year = 2027;
UPDATE pitch_financials SET customers_count = 100, revenue_eur = 1400000, mrr_eur = 120000, arr_eur = 1440000 WHERE year = 2028;
UPDATE pitch_financials SET customers_count = 220, revenue_eur = 3200000, mrr_eur = 264000, arr_eur = 3168000 WHERE year = 2029;
UPDATE pitch_financials SET customers_count = 380, revenue_eur = 5500000, mrr_eur = 456000, arr_eur = 5472000 WHERE year = 2030;

COMMIT;
