From 1243a7144a30b6b9615f0a9f8ffd6e4c95e2a449 Mon Sep 17 00:00:00 2001 From: thrillfall Date: Wed, 6 Oct 2021 14:53:13 +0200 Subject: [PATCH] since we dont know from which version the update is being executed we always fix timestamps --- lib/Migration/TimestampMigration.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/Migration/TimestampMigration.php b/lib/Migration/TimestampMigration.php index bf380ff..404820e 100644 --- a/lib/Migration/TimestampMigration.php +++ b/lib/Migration/TimestampMigration.php @@ -3,7 +3,6 @@ declare(strict_types=1); namespace OCA\GPodderSync\Migration; -use OCP\IConfig; use OCP\IDBConnection; use OCP\Migration\IOutput; use Safe\DateTime; @@ -11,12 +10,10 @@ use Safe\DateTime; class TimestampMigration implements \OCP\Migration\IRepairStep { private IDBConnection $db; - private IConfig $config; - public function __construct(IDBConnection $db, IConfig $config) + public function __construct(IDBConnection $db) { $this->db = $db; - $this->config = $config; } /** @@ -32,12 +29,6 @@ class TimestampMigration implements \OCP\Migration\IRepairStep */ public function run(IOutput $output) { - $installedVersion = $this->config->getAppValue('gpoddersync', 'installed_version'); - - if (\version_compare($installedVersion, '2.1.0', '>')) { - return; - } - $queryTimestamps = 'SELECT id, timestamp FROM `*PREFIX*gpodder_episode_action` WHERE timestamp_epoch = 0'; $timestamps = $this->db->executeQuery($queryTimestamps)->fetchAll();