public function actionExecute($params = array())
 {
     if (!empty($params['module'])) {
         \Loader::import('Modules.' . $params['module']);
         $migrator = new MysqlDbMigrator($params['module']);
         $migrator->migrateTo('last');
         echo "Done!\n";
     } else {
         echo "Please specify module name!\n";
     }
 }
Пример #2
0
 /**
  * Uninstall: module uninstall action
  *
  * @return boolean
  */
 public function uninstall()
 {
     // 1. remove tables
     $migrator = new MysqlDbMigrator($this->sModuleAlias);
     $migrator->migrateTo(-1);
     // 2. remove row from the modules table
     Core::app()->deleteModuleById($this->sModuleAlias);
     // 3. Delete config
     $file = RX_PATH . '/ruxon/config/modules/' . $this->sModuleAlias . '.inc.php';
     if (file_exists($file)) {
         unlink($file);
     }
     return true;
 }