38676-vm/db/migrate_planets_table.php
2026-03-05 00:11:18 +00:00

17 lines
398 B
PHP

<?php
require_once __DIR__ . '/config.php';
$db = db();
$sql = "CREATE TABLE IF NOT EXISTS planets (
id INT AUTO_INCREMENT PRIMARY KEY,
galaxy_id INT,
sector_id INT,
slot INT,
name VARCHAR(255),
type VARCHAR(255),
status VARCHAR(255),
faction_id INT,
orbital_control INT,
terrestrial_control INT
);";
$db->exec($sql);
echo "Table 'planets' checked/created.";