protected function getMigrationHistory($limit)
    {
        if ($this->db->schema->getTableSchema($this->migrationTable, true) === null) {
            $this->createMigrationHistoryTable();
        }
        $query = new Query;
        $rows = $query->select(['version', 'apply_time'])
        ->from($this->migrationTable)
        ->orderBy('apply_time DESC, version DESC')
        ->limit($limit)
        ->createCommand($this->db)
        ->queryAll();
        $history = ArrayHelper::map($rows, 'version', 'apply_time');
        unset($history[self::BASE_MIGRATION]);

        return $history;
    }
protected function getMigrationHistory($limit)
    {
        if ($this->db->schema->getTableSchema($this->migrationTable, true) === null) {
            $this->createMigrationHistoryTable();
        }
        $query = new Query;
        $rows = $query->select(['version', 'apply_time'])
        ->from($this->migrationTable)
        ->orderBy('apply_time DESC, version DESC')
        ->limit($limit)
        ->createCommand($this->db)
        ->queryAll();
        $history = ArrayHelper::map($rows, 'version', 'apply_time');
        unset($history[self::BASE_MIGRATION]);

        return $history;
    }
protected function getMigrationHistory ( $ limit ) { if ( $ this -> db -> schema -> getTableSchema ( $ this -> migrationTable , true ) === null ) { $ this -> createMigrationHistoryTable ( ) ; } $ query = new Query ; $ rows = $ query -> select ( [ 'version' , 'apply_time' ] ) -> from ( $ this -> migrationTable ) -> orderBy ( 'apply_time DESC, version DESC' ) -> limit ( $ limit ) -> createCommand ( $ this -> db ) -> queryAll ( ) ; $ history = ArrayHelper :: map ( $ rows , 'version' , 'apply_time' ) ; unset ( $ history [ self :: BASE_MIGRATION ] ) ; return $ history ; }
Returns the migration history.

@param integer $limit the maximum number of records in the history to be returned. `null` for "no limit".
@return array the migration history
Returns the migration history .