Update plugin version check for running migration

[MAILPOET-2590]
This commit is contained in:
Rostislav Wolny
2020-01-06 10:12:52 +01:00
committed by Jack Kitterhing
parent 9c82da7b01
commit 5f408b1351

View File

@ -623,8 +623,8 @@ class Populator {
private function updateLastSubscribedAt() { private function updateLastSubscribedAt() {
global $wpdb; global $wpdb;
// perform once for versions below or equal to 3.41.2 // perform once for versions below or equal to 3.42.0
if (version_compare($this->settings->get('db_version', '3.41.3'), '3.41.2', '>')) { if (version_compare($this->settings->get('db_version', '3.42.1'), '3.42.0', '>')) {
return false; return false;
} }
$query = "UPDATE `%s` SET last_subscribed_at = GREATEST(COALESCE(confirmed_at, 0), COALESCE(created_at, 0)) WHERE status != '%s' AND last_subscribed_at IS NULL;"; $query = "UPDATE `%s` SET last_subscribed_at = GREATEST(COALESCE(confirmed_at, 0), COALESCE(created_at, 0)) WHERE status != '%s' AND last_subscribed_at IS NULL;";