Deploy: 2026-05-22 23:55:19

This commit is contained in:
Hamza-Ayed
2026-05-22 23:55:19 +03:00
parent 7bf0933efb
commit 4860519f39
15 changed files with 1280 additions and 102 deletions

View File

@@ -0,0 +1,35 @@
<?php
require_once dirname(__DIR__) . '/app/bootstrap.php';
use App\Core\Database;
header('Content-Type: text/plain; charset=utf-8');
try {
echo "Connecting to database...\n";
$pdo = Database::getConnection();
$sqlFile = dirname(__DIR__) . '/create_saas_and_woocommerce_tables.sql';
if (!file_exists($sqlFile)) {
throw new \Exception("SQL file not found at: " . $sqlFile);
}
echo "Reading SQL file...\n";
$sql = file_get_contents($sqlFile);
echo "Executing SQL statements...\n";
$pdo->exec($sql);
echo "Migration completed successfully!\n";
// Verify tables
$stmt = $pdo->query("SHOW TABLES");
$tables = $stmt->fetchAll(PDO::FETCH_COLUMN);
echo "Current database tables:\n";
foreach ($tables as $t) {
echo "- $t\n";
}
} catch (\Exception $e) {
echo "Migration failed: " . $e->getMessage() . "\n";
}