<?php
try {
    $db = new PDO('sqlite:climate.db');
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    echo "Menghubungkan ke database climate.db...\n";

    // Update query untuk mengosongkan semua kolom terkait climate stripe
    $sql = "UPDATE future_climate SET 
            image_climate_stripe_url = '', 
            image_stripe_ssp126_url = '', 
            image_stripe_ssp245_url = '', 
            image_stripe_ssp370_url = '', 
            image_stripe_ssp585_url = ''";
            
    $affected = $db->exec($sql);
    echo "Sukses! Berhasil mengosongkan data Future Climate Stripe pada {$affected} baris di database.\n";

} catch (Exception $e) {
    echo "Terjadi kesalahan: " . $e->getMessage() . "\n";
}
