Skip to content

Commit

Permalink
Trigger SQL upgrade for 5.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Jan 31, 2024
1 parent a5ee991 commit ad94c8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Config/OpenAudit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

class OpenAudit extends BaseConfig
{
# leave for backwards compat $this->displayVersion = '5.0.3';
public string $displayVersion = '5.0.3';
public int $appVersion = 20231219;
# leave for backwards compat $this->displayVersion = '5.1.0';
public string $displayVersion = '5.1.0';
public int $appVersion = 20240104;

public array $enterprise_collections = array('applications' => 'cud', 'baselines' => 'crud', 'baselines_policies' => 'crud', 'baselines_results' => 'crud', 'clouds' => 'crud', 'collectors' => 'crud', 'dashboards' => 'cud', 'discovery_scan_options' => 'cud', 'files' => 'crud', 'integrations' => 'crud', 'racks' => 'crud', 'roles' => 'cu');
public array $professional_collections = array('applications' => 'r', 'clusters' => 'crud', 'dashboards' => 'r', 'discovery_scan_options' => 'r', 'maps' => 'crud', 'rules' => 'crud', 'tasks' => 'crud', 'widgets' => 'crud');
Expand Down
4 changes: 4 additions & 0 deletions app/Models/DatabaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ public function update($id = null, $data = null): bool
include "db_upgrades/db_5.0.3.php";
}

if (intval(config('Openaudit')->internal_version) < 20240104) {
include "db_upgrades/db_5.1.0.php";
}

$instance = & get_instance();
$instance->data = $output;
return true;
Expand Down

0 comments on commit ad94c8c

Please sign in to comment.