feat(dump): track async dump jobs in a status table
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user