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

Commit

Permalink
fix(install): update migration code for dev
Browse files Browse the repository at this point in the history
Signed-off-by: Domingo Oropeza <doropeza@teclib.com>
  • Loading branch information
DIOHz0r committed May 18, 2018
1 parent 70ecb2d commit 30e1916
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/upgrade/update_to_dev.php
Expand Up @@ -174,7 +174,7 @@ function plugin_flyvemdm_update_to_dev(Migration $migration) {
// All policies exist for Android
$migration->addPostQuery("UPDATE `$table` SET `is_android_policy` = '1'");

// Upgrade schema to apply policies on agents
// Upgrade schema to apply policies on fleets and agents
$table = 'glpi_plugin_flyvemdm_tasks';
if (!$DB->fieldExists($table, 'items_id_applied')) {
$migration->changeField($table, 'plugin_flyvemdm_fleets_id', 'items_id_applied', 'integer');
Expand All @@ -183,7 +183,7 @@ function plugin_flyvemdm_update_to_dev(Migration $migration) {
$migration->addKey($table, 'FK_applied', ['itemtype_applied', 'items_id_applied']);
// All tasks already created were applied on fleets
$migration->addPostQuery("UPDATE `$table` SET `itemtype_applied` = 'PluginFlyvemdmFleet'");
$migration->executeMigration();
$migration->migrationOneTable($table);
}

$table = 'glpi_plugin_flyvemdm_policies';
Expand Down

0 comments on commit 30e1916

Please sign in to comment.