34109-vm/db/migrations/007_add_teams_to_matches.php
2025-09-19 12:49:02 +00:00

12 lines
404 B
PHP

<?php
require_once __DIR__ . '/../../db/config.php';
try {
$pdo = db();
$sql = "ALTER TABLE matches ADD COLUMN team_a VARCHAR(255) NOT NULL, ADD COLUMN team_b VARCHAR(255) NOT NULL;";
$pdo->exec($sql);
echo "Table 'matches' updated successfully with 'team_a' and 'team_b' columns." . PHP_EOL;
} catch (PDOException $e) {
die("Could not update matches table: " . $e->getMessage());
}