Skip to content

Commit

Permalink
Merge pull request #2627 from dpfaffenbauer/issue/2626
Browse files Browse the repository at this point in the history
[IndexBundle] mark IndexBundle migrations as migrated and double check migration if column exists
  • Loading branch information
dpfaffenbauer committed May 8, 2024
2 parents 7065629 + 251543b commit e3842ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CoreShop/Bundle/IndexBundle/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public function install(): void
parent::install();
}

public function markAllMigrationsInstalled(): void
{
$this->markInstalled();
}

public function needsReloadAfterInstall(): bool
{
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class Version20200224161101 extends AbstractMigration
{
public function up(Schema $schema): void
{
if ($schema->getTable('coreshop_index')->hasColumn('indexLastVersion')) {
return;
}

$this->addSql(' ALTER TABLE coreshop_index ADD indexLastVersion TINYINT(1) DEFAULT \'0\' NOT NULL;');
}

Expand Down

0 comments on commit e3842ed

Please sign in to comment.