public function build(Db $db, DialectInterface $grammar)
    {
        switch ($this->action) {
            case 'create':
                return $this->buildCreate($db, $grammar);
            case 'update':
                return $this->buildUpdate($db, $grammar);
            case 'dropIfExists':
                return $this->buildDrop($db, true);
            case 'drop':
                return $this->buildDrop($db, false);
            case 'raw':
                return $this->buildRaw($db, $grammar);
            default:
                if (empty($this->action)) {
                    $message = "Blueprint must has action";
                } else {
                    $message = "Action '{$this->action}' not supported.";
                }
                throw new \RuntimeException($message);
        }
    }
public function build(Db $db, DialectInterface $grammar)
    {
        switch ($this->action) {
            case 'create':
                return $this->buildCreate($db, $grammar);
            case 'update':
                return $this->buildUpdate($db, $grammar);
            case 'dropIfExists':
                return $this->buildDrop($db, true);
            case 'drop':
                return $this->buildDrop($db, false);
            case 'raw':
                return $this->buildRaw($db, $grammar);
            default:
                if (empty($this->action)) {
                    $message = "Blueprint must has action";
                } else {
                    $message = "Action '{$this->action}' not supported.";
                }
                throw new \RuntimeException($message);
        }
    }
public function build ( Db $ db , DialectInterface $ grammar ) { switch ( $ this -> action ) { case 'create' : return $ this -> buildCreate ( $ db , $ grammar ) ; case 'update' : return $ this -> buildUpdate ( $ db , $ grammar ) ; case 'dropIfExists' : return $ this -> buildDrop ( $ db , true ) ; case 'drop' : return $ this -> buildDrop ( $ db , false ) ; case 'raw' : return $ this -> buildRaw ( $ db , $ grammar ) ; default : if ( empty ( $ this -> action ) ) { $ message = "Blueprint must has action" ; } else { $ message = "Action '{$this->action}' not supported." ; } throw new \ RuntimeException ( $ message ) ; } }
Execute the blueprint against the database.

@param \Phalcon\Db\AdapterInterface               $db
@param \Neutrino\Database\Schema\DialectInterface $grammar

@return bool
@throws \Exception
Execute the blueprint against the database .