src/Database/Migration/Table.php
public function update()
    {
        if (!$this->exists()) {
            throw new \RuntimeException('Cannot update a table that doesn\'t exist!');
        }

        // update table
        foreach ($this->getPendingColumns() as $column) {
            $this->getAdapter()->addColumn($this, $column);
        }

        foreach ($this->getIndexes() as $index) {
            $this->getAdapter()->addIndex($this, $index);
        }

        foreach ($this->getForeignKeys() as $foreignKey) {
            $this->getAdapter()->addForeignKey($this, $foreignKey);
        }

        $this->saveData();
        $this->reset(); // reset pending changes
    }
public function update()
    {
        if (!$this->exists()) {
            throw new \RuntimeException('Cannot update a table that doesn\'t exist!');
        }

        // update table
        foreach ($this->getPendingColumns() as $column) {
            $this->getAdapter()->addColumn($this, $column);
        }

        foreach ($this->getIndexes() as $index) {
            $this->getAdapter()->addIndex($this, $index);
        }

        foreach ($this->getForeignKeys() as $foreignKey) {
            $this->getAdapter()->addForeignKey($this, $foreignKey);
        }

        $this->saveData();
        $this->reset(); // reset pending changes
    }
public function update ( ) { if ( ! $ this -> exists ( ) ) { throw new \ RuntimeException ( 'Cannot update a table that doesn\'t exist!' ) ; } // update table foreach ( $ this -> getPendingColumns ( ) as $ column ) { $ this -> getAdapter ( ) -> addColumn ( $ this , $ column ) ; } foreach ( $ this -> getIndexes ( ) as $ index ) { $ this -> getAdapter ( ) -> addIndex ( $ this , $ index ) ; } foreach ( $ this -> getForeignKeys ( ) as $ foreignKey ) { $ this -> getAdapter ( ) -> addForeignKey ( $ this , $ foreignKey ) ; } $ this -> saveData ( ) ; $ this -> reset ( ) ; // reset pending changes }
Updates a table from the object instance.

@throws \RuntimeException
@return void
Updates a table from the object instance .