diff --git a/classes/ETL/Aggregator/pdoAggregator.php b/classes/ETL/Aggregator/pdoAggregator.php index c58988cc3d..3c80fabf8f 100644 --- a/classes/ETL/Aggregator/pdoAggregator.php +++ b/classes/ETL/Aggregator/pdoAggregator.php @@ -1205,7 +1205,7 @@ protected function processAggregationPeriods( "unit" => $aggregationUnit, "num_records" => $numRecords ); - $this->logger->debug(array_merge($msg, $date_result)); + $this->logger->debug(array_merge($msg, $aggregationPeriodInfo)); // Insert the new rows. @@ -1228,7 +1228,7 @@ protected function processAggregationPeriods( . " of $totalNumAggregationPeriods) $periodId records = $numRecords, time = " . round((microtime(true) - $dateIdStartTime), 2) . "s"); - } // foreach ($aggregationPeriodList as $date_result) + } // foreach ($aggregationPeriodList as $aggregationPeriodInfo) return $numPeriodsProcessed; diff --git a/classes/ETL/Ingestor/pdoIngestor.php b/classes/ETL/Ingestor/pdoIngestor.php index 9ff0168272..fb524220fe 100644 --- a/classes/ETL/Ingestor/pdoIngestor.php +++ b/classes/ETL/Ingestor/pdoIngestor.php @@ -720,6 +720,7 @@ function ($s) { } // foreach ( $this->etlDestinationTableList as $etlTableKey => $etlTable ) if ( $this->etlOverseerOptions->isDryrun() ) { + $this->logger->debug("Source query " . $this->sourceEndpoint . ":\n" . $this->sourceQueryString); // If this is DRYRUN mode clean up the files that tempnam() created foreach ( $infileList as $etlTableKey => $infileName ) { @unlink($infileName); diff --git a/classes/ETL/aRdbmsDestinationAction.php b/classes/ETL/aRdbmsDestinationAction.php index 93aab67d04..3f9f87faaa 100644 --- a/classes/ETL/aRdbmsDestinationAction.php +++ b/classes/ETL/aRdbmsDestinationAction.php @@ -254,8 +254,8 @@ protected function performTruncateDestinationTasks() $sql = "TRUNCATE TABLE $tableName"; try { + $this->logger->debug("Truncate destination task " . $this->destinationEndpoint . ":\n$sql"); if ( ! $this->etlOverseerOptions->isDryrun() ) { - $this->logger->debug("Truncate destination task " . $this->destinationEndpoint . ": $sql"); $this->destinationHandle->execute($sql); } } catch (PDOException $e) { diff --git a/classes/OpenXdmod/Ingestor/Hpcdb/PeopleOnAccounts.php b/classes/OpenXdmod/Ingestor/Hpcdb/PeopleOnAccounts.php deleted file mode 100644 index dbdd5858b1..0000000000 --- a/classes/OpenXdmod/Ingestor/Hpcdb/PeopleOnAccounts.php +++ /dev/null @@ -1,56 +0,0 @@ - poah.activity_time - ) AS end_time, - comments - FROM hpcdb_people_on_accounts_history poah - LEFT OUTER JOIN ( - SELECT poah3.person_id, MIN(poah3.activity_time) AS min_activity_time - FROM hpcdb_people_on_accounts_history poah3 - GROUP BY poah3.person_id - ) AS poah4 ON poah4.person_id = poah.person_id - ', - 'peopleonaccount', - array( - 'id', - 'account_id', - 'resource_id', - 'person_id', - 'allocationstate_id', - 'min_activity_time', - 'start_time', - 'end_time', - 'comments', - ) - ); - } -} - diff --git a/db/data/modw.sql b/db/data/modw.sql index c107ef1a70..111743c84d 100644 --- a/db/data/modw.sql +++ b/db/data/modw.sql @@ -17,4 +17,4 @@ INSERT INTO `error_descriptions` VALUES (0,'Metric OK'), /*!40000 ALTER TABLE `error_descriptions` ENABLE KEYS */; UNLOCK TABLES; -INSERT INTO `schema_version_history` VALUES ('modw', '6.0.0', NOW(), 'created', 'N/A'); +INSERT INTO `schema_version_history` VALUES ('modw', '6.6.0', NOW(), 'created', 'N/A'); diff --git a/db/migrations/6.5.0-6.6.0/modw.sql b/db/migrations/6.5.0-6.6.0/modw.sql new file mode 100644 index 0000000000..1456eb0fe4 --- /dev/null +++ b/db/migrations/6.5.0-6.6.0/modw.sql @@ -0,0 +1,14 @@ +use modw; + +LOCK TABLES `peopleonaccount` WRITE; +ALTER TABLE `peopleonaccount` DISABLE KEYS; + +ALTER TABLE `peopleonaccount` DROP COLUMN `min_activity_time`; +ALTER TABLE `peopleonaccount` DROP COLUMN `min_activity_time_ts`; +ALTER TABLE `peopleonaccount` DROP KEY `aggregation_index`; +ALTER TABLE `peopleonaccount` ADD KEY `aggregation_index` (`resource_id`,`account_id`,`person_id`,`start_time_ts`,`end_time_ts`,`allocationstate_id`); + +ALTER TABLE `peopleonaccount` ENABLE KEYS; +UNLOCK TABLES; + +INSERT INTO schema_version_history VALUES ('modw', '6.6.0', NOW(), 'upgraded', 'N/A'); diff --git a/db/schema/modw.sql b/db/schema/modw.sql index 1c85071ba2..8f14c547da 100644 --- a/db/schema/modw.sql +++ b/db/schema/modw.sql @@ -534,15 +534,13 @@ CREATE TABLE `peopleonaccount` ( `resource_id` int(11) NOT NULL, `person_id` int(11) NOT NULL, `allocationstate_id` int(11) NOT NULL, - `min_activity_time` datetime DEFAULT NULL, - `min_activity_time_ts` int(11) DEFAULT NULL, `start_time` datetime NOT NULL, `start_time_ts` int(11) DEFAULT NULL, `end_time` datetime DEFAULT NULL, `end_time_ts` int(11) DEFAULT NULL, `comments` varchar(200) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `aggregation_index` (`resource_id`,`account_id`,`person_id`,`start_time_ts`,`end_time_ts`,`allocationstate_id`,`min_activity_time_ts`) + KEY `aggregation_index` (`resource_id`,`account_id`,`person_id`,`start_time_ts`,`end_time_ts`,`allocationstate_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `peopleunderpi`;