Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-07-27 04:27:34 +0300
committerGitHub <noreply@github.com>2020-07-27 04:27:34 +0300
commit8f035baf642b2c15c5506b198b7f5cbcbb0a3faf (patch)
treea3145f06b070b3908cb1c6b7cd1ce541f2672e25 /core
parent539faeac7f49fac5d63e78edeaef25ab40f4020f (diff)
Add new dimension profilable (#16217)
Diffstat (limited to 'core')
-rw-r--r--core/Updates/4.0.0-b1.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Updates/4.0.0-b1.php b/core/Updates/4.0.0-b1.php
index fa426a25b7..8ce24c25e5 100644
--- a/core/Updates/4.0.0-b1.php
+++ b/core/Updates/4.0.0-b1.php
@@ -13,6 +13,7 @@ use Piwik\DataAccess\TableMetadata;
use Piwik\Date;
use Piwik\DbHelper;
use Piwik\Plugin\Manager;
+use Piwik\Plugins\CoreHome\Columns\Profilable;
use Piwik\Plugins\CoreHome\Columns\VisitorSecondsSinceFirst;
use Piwik\Plugins\CoreHome\Columns\VisitorSecondsSinceOrder;
use Piwik\Plugins\UsersManager\Model;
@@ -122,6 +123,7 @@ class Updates_4_0_0_b1 extends PiwikUpdates
$columnsToAdd[$table]['visitor_seconds_since_order'] = VisitorSecondsSinceOrder::COLUMN_TYPE;
}
$columnsToAdd['log_visit']['visitor_seconds_since_last'] = VisitorSecondsSinceLast::COLUMN_TYPE;
+ $columnsToAdd['log_visit']['profilable'] = Profilable::COLUMN_TYPE;
$columnsToMaybeAdd = ['revenue', 'revenue_discount', 'revenue_shipping', 'revenue_subtotal', 'revenue_tax'];
$columnsLogConversion = $tableMetadata->getColumns(Common::prefixTable('log_conversion'));
@@ -153,6 +155,10 @@ class Updates_4_0_0_b1 extends PiwikUpdates
$migrations[] = $this->migration->db->sql("UPDATE $visitActionTable SET search_count = custom_var_v5 WHERE custom_var_k5 = '_pk_scount'");
}
+ $logVisit = Common::prefixTable('log_visit');
+ // until 3.14.0 config_cookie was always 0 if cookies were disabled so for most visits this will be fairly accurate.
+ $migrations[] = $this->migration->db->sql("UPDATE $logVisit SET profilable = config_cookie WHERE profilable is null");
+
if ($this->usesGeoIpLegacyLocationProvider()) {
// activate GeoIp2 plugin for users still using GeoIp2 Legacy (others might have it disabled on purpose)
$migrations[] = $this->migration->plugin->activate('GeoIp2');