Skip to content

Commit

Permalink
Merge pull request #86 from nerds-and-company/plugin_database_update_fix
Browse files Browse the repository at this point in the history
Don't care about instable plugin database update outcome
  • Loading branch information
Bob Olde Hampsink authored Mar 8, 2017
2 parents 98f6003 + 5010774 commit 7f4e3a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
###3.6.1###
- Don't care about instable plugin database update outcome

###3.6.0###
- Delete old blocktypes from matrixfields on force. (thanks to @Zae)
- Beware backwards compatibility for the custom Field Models. There is now a $force parameter on the populate method.
Expand Down
17 changes: 1 addition & 16 deletions src/Services/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,6 @@ protected function togglePluginByHandle($handle, $isEnabled)
}
}

/**
* Run plugin migrations automatically.
*
* @param string $handle
*
* @throws Exception
*/
protected function runMigrations($handle)
{
$result = $this->getUpdatesService()->updateDatabase($handle);
if (!$result['success']) {
$this->addError($result['message']);
}
}

/**
* @param BasePlugin $plugin
*
Expand Down Expand Up @@ -152,7 +137,7 @@ public function import(array $pluginDefinitions, $force = false)
$this->togglePluginByHandle($handle, $pluginDefinition['isEnabled']);

if (!$isNewPlugin && $plugin->isEnabled) {
$this->runMigrations($handle);
$this->getUpdatesService()->updateDatabase($handle);
}

if (array_key_exists('settings', $pluginDefinition)) {
Expand Down

0 comments on commit 7f4e3a4

Please sign in to comment.