/**
  * Drop and create a new view
  *
  * @param View $view
  */
 public function dropAndCreateView(View $view)
 {
     $this->tryMethod('dropView', $view->getName());
     $this->createView($view);
 }
 /**
  * {@inheritdoc}
  */
 protected function _getPortableViewsList($views)
 {
     $viewsParts = array();
     foreach ($views as $value) {
         $value = array_change_key_case($value, \CASE_LOWER);
         $viewName = $value['viewname'];
         if (!isset($viewsParts[$viewName])) {
             $viewsParts[$viewName] = array();
         }
         $viewsParts[$viewName][$value['seqno']] = $value['viewtext'];
     }
     $list = array();
     foreach ($viewsParts as $viewName => $viewSql) {
         ksort($viewSql, \SORT_NUMERIC);
         $viewSql = implode('', $viewSql);
         $view = new View($viewName, $viewSql);
         $viewName = strtolower($view->getQuotedName($this->_platform));
         $list[$viewName] = $view;
     }
     return $list;
 }
 /**
  * Drops and creates a new view.
  *
  * @param \Doctrine\DBAL\Schema\View $view
  *
  * @return void
  */
 public function dropAndCreateView(View $view)
 {
     $this->tryMethod('dropView', $view->getQuotedName($this->_platform));
     $this->createView($view);
 }
 /**
  * Creates a new view.
  *
  * @param \Doctrine\DBAL\Schema\View $view
  *
  * @return void
  */
 public function createView(View $view)
 {
     $this->_execSql($this->_platform->getCreateViewSQL($view->getQuotedName($this->_platform), $view->getSql()));
 }