feat(dump): track async dump jobs in a status table

This commit is contained in:
2026-09-14 22:00:26 +02:00
parent 44e7648e06
commit f982c3c3da
2 changed files with 124 additions and 0 deletions
@@ -0,0 +1,35 @@
<?php declare(strict_types=1);
namespace AeonDumpManager\Migration;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Migration\MigrationStep;
class Migration1789413583CreateDumpJobTable extends MigrationStep
{
public function getCreationTimestamp(): int
{
return 1789413583;
}
public function update(Connection $connection): void
{
$connection->executeStatement(<<<'SQL'
CREATE TABLE IF NOT EXISTS `aeon_dump_manager_job` (
`id` BINARY(16) NOT NULL,
`status` VARCHAR(20) NOT NULL,
`percent` SMALLINT UNSIGNED NULL,
`filename` VARCHAR(255) NULL,
`error_message` TEXT NULL,
`created_at` DATETIME(3) NOT NULL,
`updated_at` DATETIME(3) NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
SQL);
}
public function updateDestructive(Connection $connection): void
{
// nothing destructive to do
}
}