-- ============================================
-- INSERTION DES SCRAPERS EXISTANTS
-- ============================================

-- Scrapers EEX CO2
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('EEX_CO2_FUTURES', 
 'C:/xampp/htdocs/scrapping_V4/public/eex/future/scraper_EEX_CO2_FUTURES.php',
 'dm_eex_co2_future',
 'Scraper des contrats futures CO2/EUA (European Union Allowances)',
 '08:30:00',
 'daily',
 0, 0, 
 90);

-- Scrapers EEX Gas Spot
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('EEX_GAS_SPOT', 
 'C:/xampp/htdocs/scrapping_V4/public/eex/spot/scraper_EEX_GAS_SPOT.php',
 'dm_eex_gas_spot',
 'Scraper des prix spot du gaz naturel européen',
 '07:00:00',
 'daily',
 0, 0, 
 85);

-- Scrapers EEX Power
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('EEX_POWER_SPOT_FR', 
 'C:/xampp/htdocs/scrapping_V4/public/eex/spot/scraper_EEX_POWER_SPOT_FR.php',
 'dm_eex_power_spot_fr',
 'Scraper des prix spot électricité France',
 '07:15:00',
 'daily',
 0, 0, 
 80);

-- Scrapers EPEX
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('EPEX_SPOT_DA', 
 'C:/xampp/htdocs/scrapping_V4/public/epex/scraper_EPEX_DA.php',
 'dm_epex_day_ahead',
 'Scraper EPEX Day-Ahead (J+1)',
 '06:30:00',
 'daily',
 1, 1, 
 95);

-- Scrapers Nordpool
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('NORDPOOL_SPOT', 
 'C:/xampp/htdocs/scrapping_V4/public/nordpool/scraper_NORDPOOL.php',
 'dm_nordpool_spot',
 'Scraper Nordpool marché spot nordique',
 '08:00:00',
 'daily',
 1, 1, 
 85);

-- Scrapers CME
INSERT INTO dm_scraper_config 
(scraper_name, scraper_path, target_table, description, schedule_time, schedule_frequency, run_saturday, run_sunday, priority) 
VALUES
('CME_FUTURES', 
 'C:/xampp/htdocs/scrapping_V4/public/cme/scraper_CME_FUTURES.php',
 'dm_cme_futures',
 'Scraper CME contrats futures énergie',
 '09:00:00',
 'daily',
 0, 0, 
 75);

-- Vue rapide pour vérifier
SELECT 
    scraper_name, 
    schedule_time, 
    schedule_frequency, 
    CONCAT(run_monday, run_tuesday, run_wednesday, run_thursday, run_friday, run_saturday, run_sunday) as days_pattern,
    is_active,
    priority
FROM dm_scraper_config
ORDER BY priority DESC, schedule_time;
