/** * @inheritDoc */ public function actionDown($limit = 'all') { $ret = parent::actionDown('all'); $query = new Query(); $query->from($this->migrationTable); if (1 == $query->count()) { $this->deleteMigrationHistoryTable(); } return $ret; }
/** * @inheritDoc */ public function actionDown($limit = 'all') { $ret = parent::actionDown('all'); $query = new Query(); $query->from($this->migrationTable); if (1 == $query->count()) { $tableName = $this->db->schema->getRawTableName($this->migrationTable); $this->stdout("Deleting migration history table \"{$tableName}\"...", Console::FG_YELLOW); $this->db->createCommand()->dropTable($this->migrationTable)->execute(); $this->stdout("Done.\n", Console::FG_GREEN); } return $ret; }
/** * Migrates current module down. * @param string $module module name. * @param string|integer $limit migrations limit. */ public function actionModuleDown($module, $limit = 'all') { $this->setModuleMigrationPaths($module); parent::actionDown($limit); }