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
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-26 04:16:38 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-26 04:16:38 +0400
commitd2fc5e31085ea699d5593d7078f8bae5787d66ac (patch)
tree4fc71e23cd82a8248fca3cb060b9447802057965 /plugins/Actions/Columns
parent219fe98c254d3272d02c9a98488d09ff7ab85a26 (diff)
smarter install and update of columns which will automatically update the column in case the type changes making it super easy for developers, not sure if everything works already and need to xhprof it
Diffstat (limited to 'plugins/Actions/Columns')
-rw-r--r--plugins/Actions/Columns/ServerTime.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/Actions/Columns/ServerTime.php b/plugins/Actions/Columns/ServerTime.php
index 9240fba414..8c13bbde63 100644
--- a/plugins/Actions/Columns/ServerTime.php
+++ b/plugins/Actions/Columns/ServerTime.php
@@ -21,18 +21,12 @@ class ServerTime extends ActionDimension
protected $columnName = 'server_time';
protected $columnType = 'DATETIME NOT NULL';
- public function install($actionColumns)
+ public function install()
{
- if (array_key_exists($this->columnName, $actionColumns)) {
- return array();
- }
+ $changes = parent::install();
+ $changes['log_link_visit_action'][] = "ADD INDEX index_idsite_servertime ( idsite, server_time )";
- return array(
- Common::prefixTable("log_link_visit_action") => array(
- "ADD COLUMN server_time DATETIME NOT NULL",
- "ADD INDEX index_idsite_servertime ( idsite, server_time )"
- )
- );
+ return $changes;
}
public function getName()