diff --git a/mailpoet/lib/Migrator/Store.php b/mailpoet/lib/Migrator/Store.php index feb60bf252..73feac675f 100644 --- a/mailpoet/lib/Migrator/Store.php +++ b/mailpoet/lib/Migrator/Store.php @@ -29,7 +29,9 @@ class Store { VALUES (?, current_timestamp()) ON DUPLICATE KEY UPDATE started_at = current_timestamp(), - retries = retries + 1 + completed_at = NULL, + retries = retries + 1, + error = NULL ", [$name]); } diff --git a/mailpoet/tests/integration/Migrator/MigratorTest.php b/mailpoet/tests/integration/Migrator/MigratorTest.php index 41a08e98b9..7ec4f30269 100644 --- a/mailpoet/tests/integration/Migrator/MigratorTest.php +++ b/mailpoet/tests/integration/Migrator/MigratorTest.php @@ -212,7 +212,7 @@ class MigratorTest extends MailPoetTest { $this->assertStringMatchesFormat(self::DATE_TIME_FORMAT, $data['started_at']); $this->assertStringMatchesFormat(self::DATE_TIME_FORMAT, $data['completed_at']); $this->assertSame(1, (int)$data['retries']); - $this->assertSame('test-error', $data['error']); + $this->assertNull($data['error']); } public function testItFailsBrokenMigration(): void {