refactor: track import progress per film instead of per batch
Replace batch-level progress (processedBatches/totalBatches) with film-level progress (processedFilms/totalFilms) for smoother UI updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
migrations/Version20260401000002.php
Normal file
30
migrations/Version20260401000002.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20260401000002 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add processed_films column to import table';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE import ADD processed_films INT NOT NULL DEFAULT 0');
|
||||
$this->addSql('ALTER TABLE import DROP COLUMN total_batches');
|
||||
$this->addSql('ALTER TABLE import DROP COLUMN processed_batches');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE import DROP COLUMN processed_films');
|
||||
$this->addSql('ALTER TABLE import ADD total_batches INT NOT NULL DEFAULT 0');
|
||||
$this->addSql('ALTER TABLE import ADD processed_batches INT NOT NULL DEFAULT 0');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user