36643-vm/db/migrations/001_create_social_connections_table.php
2025-12-04 07:22:31 +00:00

17 lines
499 B
PHP

<?php
require_once __DIR__ . '/../../db/config.php';
try {
$pdo = db();
$sql = "CREATE TABLE IF NOT EXISTS social_connections (
id INT(11) AUTO_INCREMENT PRIMARY KEY,
platform VARCHAR(255) NOT NULL UNIQUE,
is_connected BOOLEAN NOT NULL DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);";
$pdo->exec($sql);
echo "Table social_connections created successfully.";
} catch (PDOException $e) {
die("DB ERROR: " . $e->getMessage());
}
?>