-- Patch V4.1 - nu modifică structura tabelelor, doar asigură existența setărilor noi/utile.
-- Rulează acest fișier o singură dată după uploadul fișierelor modificate.

INSERT INTO app_settings (setting_key, setting_value, setting_group, updated_by, updated_at)
SELECT 'test_started_at_real', NULL, 'general', NULL, NOW()
WHERE NOT EXISTS (SELECT 1 FROM app_settings WHERE setting_key = 'test_started_at_real');

INSERT INTO app_settings (setting_key, setting_value, setting_group, updated_by, updated_at)
SELECT 'reminder_send_hour', '09:00:00', 'general', NULL, NOW()
WHERE NOT EXISTS (SELECT 1 FROM app_settings WHERE setting_key = 'reminder_send_hour');

INSERT INTO app_settings (setting_key, setting_value, setting_group, updated_by, updated_at)
SELECT 'client_expired_notice_enabled', '0', 'general', NULL, NOW()
WHERE NOT EXISTS (SELECT 1 FROM app_settings WHERE setting_key = 'client_expired_notice_enabled');
