Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(update): add missing fields
Browse files Browse the repository at this point in the history
fix value type

Signed-off-by: Naylin Medina <nmedina@teclib.com>
  • Loading branch information
Naylin15 authored and ajsb85 committed May 25, 2018
1 parent c8c332b commit 8fd9ea5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ protected function createPolicies() {
'default_value' => $policyData['default_value'],
'recommended_value' => $policyData['recommended_value'],
'type_data' => $policyData['type_data'],
'android_min_version' => $policyData['android_min_version'],
'android_max_version' => $policyData['android_max_version'],
'apple_min_version' => $policyData['apple_min_version'],
'apple_max_version' => $policyData['apple_max_version'],
'plugin_flyvemdm_policycategories_id' => $categoryId,
]);
}
Expand Down
8 changes: 4 additions & 4 deletions install/upgrade/update_to_dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ function plugin_flyvemdm_update_to_dev(Migration $migration) {
$table = 'glpi_plugin_flyvemdm_policies';
$migration->addField($table, 'recommended_value', 'string', ['after' => 'default_value']);
$migration->addField($table, 'is_android_system', 'bool', ['after' => 'recommended_value']);
$migration->addField($table, 'android_min_version', 'bool', ['after' => 'is_android_system']);
$migration->addField($table, 'android_max_version', 'bool', ['after' => 'android_min_version']);
$migration->addField($table, 'apple_min_version', 'bool', ['after' => 'android_max_version']);
$migration->addField($table, 'apple_max_version', 'bool', ['after' => 'apple_min_version']);
$migration->addField($table, 'android_min_version', 'string', ['after' => 'is_android_system', 'value' => '0']);
$migration->addField($table, 'android_max_version', 'string', ['after' => 'android_min_version', 'value' => '0']);
$migration->addField($table, 'apple_min_version', 'string', ['after' => 'android_max_version', 'value' => '0']);
$migration->addField($table, 'apple_max_version', 'string', ['after' => 'apple_min_version', 'value' => '0']);
$migration->addKey($table, 'group', 'group');
$migration->addKey($table, 'plugin_flyvemdm_policycategories_id', 'plugin_flyvemdm_policycategories_id');
$migration->dropField($table, 'is_android_policy');
Expand Down

0 comments on commit 8fd9ea5

Please sign in to comment.