/** * Removes a database update script in the history table. */ protected function removeDatabaseScript($code, $version, $script) { /* * Execute the database PHP script */ $updateFile = $this->pluginManager->getPluginPath($code) . '/updates/' . $script; $this->updater->packDown($updateFile); Db::table('system_plugin_history')->where('code', $code)->where('type', self::HISTORY_TYPE_SCRIPT)->where('version', $version)->where('detail', $script)->delete(); }
/** * Removes an existing plugin * @param string $name Plugin name. * @return self */ public function rollbackPlugin($name) { /* * Remove the plugin database and version */ if (!($plugin = $this->pluginManager->findByIdentifier($name))) { if ($this->versionManager->purgePlugin($name)) { $this->note('<info>Purged from database:</info> ' . $name); return $this; } } if ($this->versionManager->removePlugin($plugin)) { $this->note('<info>Rolled back:</info> ' . $name); return $this; } $this->note('<error>Unable to find:</error> ' . $name); return $this; }