Skip to content

Commit

Permalink
fixing merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
eiffel777 committed Aug 21, 2024
2 parents b2bdcfd + 297a65d commit 4ec4ad1
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* Update database from version 10.5.0 to 11.0.0
*/

namespace OpenXdmod\Migration\Version1050To1100;

use OpenXdmod\Migration\DatabasesMigration as AbstractDatabasesMigration;
use CCR\DB;
use CCR\DB\MySQLHelper;
use ETL\Utilities;

/**
* Migrate databases from version 10.5.0 to 11.0.0
*/
class DatabasesMigration extends AbstractDatabasesMigration
{
public function execute()
{
parent::execute();

$dbh = DB::factory('datawarehouse');
$mysql_helper = MySQLHelper::factory($dbh);

if ($mysql_helper->tableExists('modw_cloud.event')) {
Utilities::runEtlPipeline(
['cloud-migration-10-5-0_11-0-0'],
$this->logger,
['last-modified-start-date' => '2017-01-01 00:00:00']
);
}
}
}
28 changes: 28 additions & 0 deletions configuration/etl/etl.d/xdmod-migration-10_5_0-11_0_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,36 @@
"namespace": "ETL\\Ingestor",
"class": "DatabaseIngestor",
"options_class": "IngestorOptions"
},
"cloud-migration-10-5-0_11-0-0": {
"namespace": "ETL\\Maintenance",
"options_class": "MaintenanceOptions",
"class": "ManageTables",
"endpoints": {
"destination": {
"type": "mysql",
"name": "Cloud Database",
"config": "database",
"schema": "modw_cloud"
},
"source": {
"type": "mysql",
"name": "Cloud Databaes",
"config": "database",
"schema": "modw_cloud"
}
}
}
},
"cloud-migration-10-5-0_11-0-0": [
{
"name": "UpdateInstanceTypeUnion",
"description": "Update instance type union table.",
"definition_file_list": [
"cloud_common/instance_type_union.json"
]
}
],
"migration-10_5_0-11_0_0": [
{
"name": "report-templates-charts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{
"name": "instance_type_id",
"type": "int(11)",
"default": null,
"nullable": true,
"comment": "Resource to which this type belongs"
},
Expand Down

0 comments on commit 4ec4ad1

Please sign in to comment.