Publish migration for the specified module.

@param \Pingpong\Modules\Module $module
17207
public function publish($module)
    {
        with(new MigrationPublisher($module))
            ->setRepository($this->laravel['modules'])
            ->setConsole($this)
            ->publish();
    }
251669
public function register(string $module = null): void
    {
        if (!class_exists($module)) {
            throw new ClassNotFoundException($module);
        }
        $this->modules[] = new $module;
    }
1011406
public function removeModule($module)
    {
        foreach ($this->modules as $key => $moduleElement) {
            if ($moduleElement === $module) {
                unset($this->modules[$key]);
                break;
            }
        }

        return $this;
    }
343307
private function isModule(string $module) : bool
    {
        $config = (new ModuleConfig(ConfigType::MIGRATION(), $module, null, ['cacheSkip' => true]))->parse();
        $config = json_encode($config);
        if (false === $config) {
            return false;
        }
        $config = json_decode($config, true);
        if (empty($config)) {
            return false;
        }

        $config = (new ModuleConfig(ConfigType::MODULE(), $module, null, ['cacheSkip' => true]))->parse();
        if (! property_exists($config, 'table')) {
            return false;
        }
        if (! property_exists($config->table, 'type')) {
            return false;
        }

        if ('module' !== $config->table->type) {
            return false;
        }

        return true;
    }
451985
public function setModule($module)
    {
        $this->module = is_string($module) ? $module : $this->$module;
        $this->prepareUrl();

        return $this;
    }
1374990
public function enableModules($modules)
    {
        foreach ($modules as $moduleToEnable => $value) {
            $module = $this->module->get($moduleToEnable);
            $module->enable();
        }
    }
983663
public function migrateModule(ModuleContainerInterface $module)
    {
        $path = $module->getPath(['database', 'migrations']);
        $files = $this->migrator->getMigrationFiles($path);

        // Once we grab all of the migration files for the path, we will compare them
        // against the migrations that have already been run for this package then
        // run each of the outstanding migrations against a database connection.
        $ran = $this->migrator->getRepository()->getRan();

        $migrations = array_diff($files, $ran);
        $this->migrator->requireFiles($path, $migrations);

        foreach ($migrations as $migration) {
            $this->migrations[] = $migration;
        }

        return $this;
    }
354079
public function activate(\OxidEsales\Eshop\Core\Module\Module $module)
    {
        $result = false;
        if ($moduleId = $module->getId()) {
            $this->_addExtensions($module);
            $this->_removeFromDisabledList($moduleId);

            if (version_compare($module->getMetaDataVersion(), '2.0', '<')) {
                /** Support for the key 'files' was removed in MetaData version 2.0 */
                $this->_addModuleFiles($module->getInfo("files"), $moduleId);
            }

            $this->_addTemplateBlocks($module->getInfo("blocks"), $moduleId);
            $this->_addTemplateFiles($module->getInfo("templates"), $moduleId);
            $settingsHandler = oxNew(SettingsHandler::class);
            $settingsHandler->setModuleType('module')->run($module);
            $this->_addModuleVersion($module->getInfo("version"), $moduleId);
            $this->_addModuleExtensions($module->getExtensions(), $moduleId);
            $this->_addModuleEvents($module->getInfo("events"), $moduleId);

            if (version_compare($module->getMetaDataVersion(), '2.0', '>=')) {
                try {
                    /** Support for the key 'controllers' was added in MetaData version 2.0 */
                    $this->addModuleControllers($module->getControllers(), $moduleId);
                } catch (ModuleValidationException $exception) {
                    $this->deactivate($module);
                    $lang = Registry::getLang();
                    $message = sprintf($lang->translateString('ERROR_METADATA_CONTROLLERS_NOT_UNIQUE', null, true), $exception->getMessage());

                    $standardException = oxNew(StandardException::class);
                    $standardException->setMessage($message);

                    throw $standardException;
                }
            }

            if (version_compare($module->getMetaDataVersion(), '2.1', '>=')) {
                try {
                    $this->addModuleSmartyPluginDirectories($module);
                } catch (\Exception $exception) {
                    $this->deactivate($module);

                    throw oxNew(StandardException::class, $exception->getMessage());
                }
            }

            $this->activateShopAwareServices($module);

            $this->resetCache();

            $this->_callEvent('onActivate', $moduleId);

            $result = true;
        }

        return $result;
    }
483962
def migrate(module=None):
    
    if not module:
        #Parsing
        parser = argparse.ArgumentParser()
        parser.add_argument('-s', '--service', type=str, help='Migrate the module', required=True,
                            dest='module')
        args = parser.parse_args()
        module = args.module
    #1. Load settings
    farine.settings.load()
    #2. Load the module
    models = farine.discovery.import_models(module)
    #3. Get the connection
    db = farine.connectors.sql.setup(getattr(farine.settings, module))
    #4. Create tables
    for model in models:
        model._meta.database = db
        model.create_table(fail_silently=True)
354833
public function updateModule()
	{
		$this->moduleHandle->cacheModuleConfig();	//oke
		$this->moduleHandle->setModules();	//oke
		$this->moduleHandle->updateModuleAddon();
	}
1107633
protected function attachModuleMigrations()
    {
        foreach (Yii::$app->modules as $name => $config) {
            $basePath = Yii::$app->getModule($name)->basePath;
            $path = $basePath . DIRECTORY_SEPARATOR. 'migrations';
            if (isset($this->migrationPath[0]) && $this->migrationPath[0] == $path) {
                continue;
            }
            if (file_exists($path) && !is_file($path)) {
                $this->allMigrationPaths[$name] = $path;
            }
        }
    }
618259
public void unloadModule(Module module) {
        Objects.requireNonNull(module, "module");
        unloadModuleLocal(module);
        moduleSpecs.remove(module.getIdentifier());
    }
634856
protected function loadMigrationFiles($module)
    {
        $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath();

        $files = $this->laravel['files']->glob($path . '/*_*.php');

        foreach ($files as $file) {
            $this->laravel['files']->requireOnce($file);
        }
    }
91747
public function fire(Command $command)
    {
        if ($command->option('verbose')) {
            $command->blockMessage('Migrations', 'Starting the module migrations ...', 'comment');
        }

        foreach ($this->modules as $module) {
            if ($command->option('verbose')) {
                $command->call('module:migrate', ['module' => $module]);
                continue;
            }
            $command->callSilent('module:migrate', ['module' => $module]);
        }
    }
661122
public function processModule($module)
    {
        if (!isset($this->registeredModules[$module]) || is_object($module)) {
            $this->registerModule($module);
        }
        $this->modules[$module] = $this->registeredModules[$module];
    }
364965
private function setByTypeModule(string $module, array $fields) : void
    {
        foreach ($fields as $field) {
            $this->setByTypeModuleField($module, $field);
        }
    }
573507
protected function registerLanguageNamespace(Module $module)
    {
        $moduleName = $module->getName();

        $langPath = base_path("resources/lang/modules/$moduleName");

        if (is_dir($langPath)) {
            $this->loadTranslationsFrom($langPath, $moduleName);
            $this->app['localization.js-generator']->addSourcePath($langPath, $moduleName);
        } else {
            $this->loadTranslationsFrom($module->getPath().'/Resources/lang', $moduleName);
            $this->app['localization.js-generator']->addSourcePath($module->getPath().'/Resources/lang', $moduleName);
        }
    }