<?php
require_once('../../../wp-load.php');
global $wpdb;
$table = $wpdb->prefix . 'vs_withdrawals';
$row = $wpdb->get_results("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table' AND COLUMN_NAME = 'updated_at'");
if(empty($row)){
   $wpdb->query("ALTER TABLE $table ADD updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP");
   echo "Column updated_at added successfully.";
} else {
   echo "Column updated_at already exists.";
}
