| Server IP : 72.60.21.38 / Your IP : 216.73.216.25 Web Server : LiteSpeed System : Linux uk-fast-web1372.main-hosting.eu 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64 User : u390967363 ( 390967363) PHP Version : 8.2.30 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u390967363/domains/aibenproperties.com/public_html/app/ |
Upload File : |
<?php
require_once __DIR__ . '/includes/db.php';
require_once __DIR__ . '/includes/functions.php';
try {
echo "Updating schema for Payment Reminders...\n";
// Add reminder fields to installments (this handles payment schedules)
$pdo->exec("ALTER TABLE installments
ADD COLUMN IF NOT EXISTS reminder_7_sent BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS reminder_2_sent BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS reminder_due_sent BOOLEAN DEFAULT FALSE
");
echo "Added reminder tracking columns to 'installments' table.\n";
// If a payment_schedules table exists, we add columns there as well
$hasPaySchedules = $pdo->query("SHOW TABLES LIKE 'payment_schedules'")->rowCount() > 0;
if ($hasPaySchedules) {
$pdo->exec("ALTER TABLE payment_schedules
ADD COLUMN IF NOT EXISTS reminder_7_sent BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS reminder_2_sent BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS reminder_due_sent BOOLEAN DEFAULT FALSE
");
echo "Added reminder tracking columns to 'payment_schedules' table.\n";
}
echo "Schema update successful.\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}