protected function _process( array $stmts )
	{
		$this->_msg( 'Migrating catalog suggest tables', 0 ); $this->_status( '' );
		$this->_msg( sprintf( 'Checking table "%1$s": ', 'mshop_catalog_suggest' ), 1 );

		if( $this->_schema->tableExists( 'mshop_catalog_suggest' ) === true )
		{
			$result = $this->_conn->create( $stmts['gettypeid'] )->execute();

			if( ( $row = $result->fetch( MW_DB_Result_Abstract::FETCH_NUM ) ) === false ) {
				throw new MW_Setup_Exception( 'Product list type "suggestion" is missing' );
			}

			$result->finish();


			$result = $this->_conn->create( str_replace( ':typeid', $row[0], $stmts['migrate'] ) )->execute();
			$count = $result->affectedRows();
			$result->finish();


			$this->_executeList( $stmts['drop'] );

			$this->_status( sprintf( 'migrated (%1$d)', $count ) );
		}
		else
		{
			$this->_status( 'OK' );
		}
	}
protected function _process( array $stmts )
	{
		$this->_msg( 'Migrating catalog suggest tables', 0 ); $this->_status( '' );
		$this->_msg( sprintf( 'Checking table "%1$s": ', 'mshop_catalog_suggest' ), 1 );

		if( $this->_schema->tableExists( 'mshop_catalog_suggest' ) === true )
		{
			$result = $this->_conn->create( $stmts['gettypeid'] )->execute();

			if( ( $row = $result->fetch( MW_DB_Result_Abstract::FETCH_NUM ) ) === false ) {
				throw new MW_Setup_Exception( 'Product list type "suggestion" is missing' );
			}

			$result->finish();


			$result = $this->_conn->create( str_replace( ':typeid', $row[0], $stmts['migrate'] ) )->execute();
			$count = $result->affectedRows();
			$result->finish();


			$this->_executeList( $stmts['drop'] );

			$this->_status( sprintf( 'migrated (%1$d)', $count ) );
		}
		else
		{
			$this->_status( 'OK' );
		}
	}
protected function _process ( array $ stmts ) { $ this -> _msg ( 'Migrating catalog suggest tables' , 0 ) ; $ this -> _status ( '' ) ; $ this -> _msg ( sprintf ( 'Checking table "%1$s": ' , 'mshop_catalog_suggest' ) , 1 ) ; if ( $ this -> _schema -> tableExists ( 'mshop_catalog_suggest' ) === true ) { $ result = $ this -> _conn -> create ( $ stmts [ 'gettypeid' ] ) -> execute ( ) ; if ( ( $ row = $ result -> fetch ( MW_DB_Result_Abstract :: FETCH_NUM ) ) === false ) { throw new MW_Setup_Exception ( 'Product list type "suggestion" is missing' ) ; } $ result -> finish ( ) ; $ result = $ this -> _conn -> create ( str_replace ( ':typeid' , $ row [ 0 ] , $ stmts [ 'migrate' ] ) ) -> execute ( ) ; $ count = $ result -> affectedRows ( ) ; $ result -> finish ( ) ; $ this -> _executeList ( $ stmts [ 'drop' ] ) ; $ this -> _status ( sprintf ( 'migrated (%1$d)' , $ count ) ) ; } else { $ this -> _status ( 'OK' ) ; } }
Renames catalog_tree table if it exists.

@param array $stmts Associative array of table name and lists of SQL statements to execute.
Renames catalog_tree table if it exists .