public function actionMigrate() { $migration = \humhub\commands\MigrateController::webMigrateAll(); Yii::$app->getSession()->setFlash('updater_migration', $migration); // Flush caches Yii::$app->moduleManager->flushCache(); Yii::$app->cache->flush(); $this->redirect(['finish']); }
/** * Self Test */ public function actionSelfTest() { return $this->render('selftest', array('checks' => \humhub\libs\SelfTest::getResults(), 'migrate' => \humhub\commands\MigrateController::webMigrateAll())); }
/** * The init action imports the database structure & inital data */ public function actionInit() { if (!$this->module->checkDBConnection()) { return $this->redirect(['/installer/setup/database']); } // Flush Caches Yii::$app->cache->flush(); // Disable max execution time to avoid timeouts during database installation @ini_set('max_execution_time', 0); // Migrate Up Database $result = \humhub\commands\MigrateController::webMigrateAll(); DynamicConfig::rewrite(); $this->module->setDatabaseInstalled(); return $this->redirect(['/installer/config/index']); }
/** * Execute all not applied module migrations */ public function migrate() { $migrationPath = $this->basePath . '/migrations'; if (is_dir($migrationPath)) { \humhub\commands\MigrateController::webMigrateUp($migrationPath); } }
public function actionDatabase() { return $this->render('database', ['migrate' => \humhub\commands\MigrateController::webMigrateAll()]); }