12 lines
355 B
PHP
12 lines
355 B
PHP
<?php
|
|
require_once 'db/config.php';
|
|
|
|
try {
|
|
$pdo = db();
|
|
$sql = "ALTER TABLE `patient_visits` CHANGE `id` `visit_id` INT(11) NOT NULL AUTO_INCREMENT;";
|
|
$pdo->exec($sql);
|
|
echo "Table 'patient_visits' altered successfully. Column 'id' renamed to 'visit_id'.\n";
|
|
} catch (PDOException $e) {
|
|
die("Database error: " . $e->getMessage());
|
|
}
|
|
?>
|