INSERT INTO app_settings (setting_key, setting_value, created_at, updated_at)
VALUES
    ('allegro_status_sync_direction', 'allegro_to_orderpro', NOW(), NOW()),
    ('allegro_status_sync_interval_minutes', '15', NOW(), NOW())
ON DUPLICATE KEY UPDATE
    setting_value = VALUES(setting_value),
    updated_at = VALUES(updated_at);

INSERT INTO cron_schedules (
    job_type, interval_seconds, priority, max_attempts, payload, enabled, last_run_at, next_run_at, created_at, updated_at
) VALUES (
    'allegro_status_sync',
    900,
    25,
    3,
    NULL,
    1,
    NULL,
    NOW(),
    NOW(),
    NOW()
)
ON DUPLICATE KEY UPDATE
    interval_seconds = VALUES(interval_seconds),
    priority = VALUES(priority),
    max_attempts = VALUES(max_attempts),
    payload = VALUES(payload),
    enabled = VALUES(enabled),
    updated_at = VALUES(updated_at);
