-- ============================================
-- Script SQL pour vérifier quelles tables existent
-- ============================================

-- Afficher toutes les tables de la base de données
SHOW TABLES;

-- Vérifier les tables critiques
SELECT 
    CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'MISSING' END as status,
    'options' as table_name
FROM information_schema.tables 
WHERE table_schema = DATABASE() AND table_name = 'options'

UNION ALL

SELECT 
    CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'MISSING' END as status,
    'option_availability' as table_name
FROM information_schema.tables 
WHERE table_schema = DATABASE() AND table_name = 'option_availability'

UNION ALL

SELECT 
    CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'MISSING' END as status,
    'option_pricing' as table_name
FROM information_schema.tables 
WHERE table_schema = DATABASE() AND table_name = 'option_pricing'

UNION ALL

SELECT 
    CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'MISSING' END as status,
    'working_hours' as table_name
FROM information_schema.tables 
WHERE table_schema = DATABASE() AND table_name = 'working_hours'

UNION ALL

SELECT 
    CASE WHEN COUNT(*) > 0 THEN 'EXISTS' ELSE 'MISSING' END as status,
    'blocked_dates' as table_name
FROM information_schema.tables 
WHERE table_schema = DATABASE() AND table_name = 'blocked_dates';



