Running Migration 008...";
echo "
";
foreach ($queries as $query) {
if (empty($query)) continue;
try {
$db->exec($query);
echo "- ✅ Executed:
" . htmlspecialchars(substr($query, 0, 70)) . "...
";
} catch (\Exception $innerE) {
if (str_contains($innerE->getMessage(), 'Duplicate column name')) {
echo "- ℹ️ تخطي (العمود موجود مسبقاً):
" . htmlspecialchars(substr($query, 0, 70)) . "...
";
} else {
throw $innerE;
}
}
}
echo "
";
echo "Migration completed successfully!
";
echo "Please delete this file (public/migrate_008.php) for security.
";
} catch (\Exception $e) {
echo "Migration failed:
";
echo "" . htmlspecialchars($e->getMessage()) . "
";
}