mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
fix: plugin migration rollback and cache clearing on uninstall (#2033)
Co-authored-by: Boy132 <mail@boy132.de>
This commit is contained in:
@@ -235,7 +235,7 @@ class PluginService
|
||||
if (file_exists($migrations)) {
|
||||
try {
|
||||
$migrator = $this->app->make(Migrator::class);
|
||||
$migrator->rollback($migrations);
|
||||
$migrator->reset($migrations);
|
||||
} catch (Exception $exception) {
|
||||
throw new Exception("Could not rollback migrations': " . $exception->getMessage());
|
||||
}
|
||||
@@ -337,6 +337,11 @@ class PluginService
|
||||
$this->buildAssets();
|
||||
|
||||
$this->manageComposerPackages(oldPackages: $pluginPackages);
|
||||
|
||||
// This throws an error when not called with qualifier
|
||||
foreach (\Filament\Facades\Filament::getPanels() as $panel) {
|
||||
$panel->clearCachedComponents();
|
||||
}
|
||||
}
|
||||
|
||||
/** @throws Exception */
|
||||
|
||||
Reference in New Issue
Block a user