Skip to content

Commit

Permalink
always drop jobs table on version change
Browse files Browse the repository at this point in the history
  • Loading branch information
bi0nd0 committed Nov 30, 2021
1 parent f6afc64 commit 88080c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 10 additions & 3 deletions AdvancedImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,20 @@ public function redcap_module_system_change_version($version, $old_version)
*/
$checkColumnarDbInstalled = function() use($old_version){
$columnarMinimunVersion = 'v1.7.0';
$greaterThanMinimumVersion = $this->compareVersions($columnarMinimunVersion, $old_version);
if(!$greaterThanMinimumVersion) {
$comparison = $this->compareVersions($columnarMinimunVersion, $old_version);
if($comparison<0) {
$queue = new Queue();
$queue->createJobsTable($drop=true);
};
};
$checkColumnarDbInstalled();
/**
* reset the jobs table on every update
*/
$resetJobsTable = function() {
$queue = new Queue();
$queue->createJobsTable($drop=true);
};
$resetJobsTable();
$this->checkDbIntegrity($db);
}

Expand Down
8 changes: 7 additions & 1 deletion app/Helpers/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ class Query
* @var string
*/
private $query;

/**
*
* @var ColumnarDatabase
*/
private $db;

/**
* Undocumented function
*
* @param ColumnarDatabase $db
* @param string $query
Expand Down

0 comments on commit 88080c2

Please sign in to comment.