Files
michaelschiemer/tests/debug/check-database-schema.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
2025-10-25 19:18:37 +02:00

107 lines
3.2 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\Core\AppBootstrapper;
use App\Framework\Database\ConnectionInterface;
use App\Framework\Database\ValueObjects\SqlQuery;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\Performance\MemoryMonitor;
echo "🔍 Checking Database Schema\n";
echo "==========================\n\n";
try {
// Bootstrap the application
$clock = new SystemClock();
$highResClock = new SystemHighResolutionClock();
$memoryMonitor = new MemoryMonitor();
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: false);
$bootstrapper = new AppBootstrapper(__DIR__ . '/../..', $collector, $memoryMonitor);
$container = $bootstrapper->bootstrapWorker();
$connection = $container->get(ConnectionInterface::class);
// Check job_history table structure
echo "📊 job_history table structure:\n";
echo "-------------------------------\n";
$result = $connection->query(SqlQuery::create("DESCRIBE job_history"));
$columns = $result->fetchAll();
foreach ($columns as $column) {
echo sprintf(
"%-20s %-15s %-10s %-10s %-10s\n",
$column['Field'],
$column['Type'],
$column['Null'],
$column['Key'],
$column['Default'] ?? 'NULL'
);
}
echo "\n📊 dead_letter_jobs table structure:\n";
echo "------------------------------------\n";
try {
$result = $connection->query(SqlQuery::create("DESCRIBE dead_letter_jobs"));
$columns = $result->fetchAll();
foreach ($columns as $column) {
echo sprintf(
"%-20s %-15s %-10s %-10s %-10s\n",
$column['Field'],
$column['Type'],
$column['Null'],
$column['Key'],
$column['Default'] ?? 'NULL'
);
}
} catch (\Exception $e) {
echo "Table dead_letter_jobs: " . $e->getMessage() . "\n";
}
echo "\n📊 job_metrics table structure:\n";
echo "-------------------------------\n";
try {
$result = $connection->query(SqlQuery::create("DESCRIBE job_metrics"));
$columns = $result->fetchAll();
foreach ($columns as $column) {
echo sprintf(
"%-20s %-15s %-10s %-10s %-10s\n",
$column['Field'],
$column['Type'],
$column['Null'],
$column['Key'],
$column['Default'] ?? 'NULL'
);
}
} catch (\Exception $e) {
echo "Table job_metrics: " . $e->getMessage() . "\n";
}
echo "\n📊 Available tables:\n";
echo "-------------------\n";
$result = $connection->query(SqlQuery::create("SHOW TABLES"));
$tables = $result->fetchAll();
foreach ($tables as $table) {
echo "" . array_values($table)[0] . "\n";
}
} catch (\Exception $e) {
echo "❌ Error checking schema: {$e->getMessage()}\n";
echo "Stack trace:\n{$e->getTraceAsString()}\n";
exit(1);
}
echo "\n✅ Schema check completed!\n";