PluginMigrationManager example

private function removeEventSubscribers($pluginId)
    {
        $sql = 'DELETE FROM s_core_subscribes WHERE pluginID = :pluginId';
        $this->connection->executeStatement($sql[':pluginId' => $pluginId]);
    }

    /** * @param AbstractPluginMigration::MODUS_* $mode */
    private function applyMigrations(PluginComponent $plugin, string $mode, bool $keepUserData = false): void
    {
        $manager = new PluginMigrationManager($this->pdo, $plugin$this->logger);
        if (!is_dir($manager->getMigrationPath())) {
            return;
        }
        $manager->run($mode$keepUserData);
    }
}
Home | Imprint | This part of the site doesn't use cookies.