<?php
require_once __DIR__ . '/../bootstrap.php';
use Gestoreasy\Core\Tenant\ConnectionManager;
use Gestoreasy\Core\Tenant\TenantAdmin;

$tenant = 'default';
TenantAdmin::runMigrations($tenant);
$pdo = ConnectionManager::forTenant($tenant);
$stmt = $pdo->query('SELECT id, batch_id, status, locked_at, attempt_count, created_at, updated_at FROM wms_inventory_queue ORDER BY id DESC');
$rows = $stmt->fetchAll();
foreach ($rows as $r) {
  echo json_encode($r, JSON_UNESCAPED_UNICODE) . "\n";
}