public function updateTable($table, $properties, $allow_delete_fields = false, $return_schema = false)
    {
        $properties = (is_array($properties) ? $properties : []);
        $properties['name'] = $table;

        $tables = static::validateAsArray($properties, null, true, 'Bad data format in request.');

        $result = $this->updateSchema($tables, true, $allow_delete_fields);
        $result = array_get($result, 0, []);

        //  Any changes here should refresh cached schema
        $this->refreshCachedTables();

        if ($return_schema) {
            return $this->describeTable($table);
        }

        return $result;
    }
public function updateTable($table, $properties, $allow_delete_fields = false, $return_schema = false)
    {
        $properties = (is_array($properties) ? $properties : []);
        $properties['name'] = $table;

        $tables = static::validateAsArray($properties, null, true, 'Bad data format in request.');

        $result = $this->updateSchema($tables, true, $allow_delete_fields);
        $result = array_get($result, 0, []);

        //  Any changes here should refresh cached schema
        $this->refreshCachedTables();

        if ($return_schema) {
            return $this->describeTable($table);
        }

        return $result;
    }
public function updateTable ( $ table , $ properties , $ allow_delete_fields = false , $ return_schema = false ) { $ properties = ( is_array ( $ properties ) ? $ properties : [ ] ) ; $ properties [ 'name' ] = $ table ; $ tables = static :: validateAsArray ( $ properties , null , true , 'Bad data format in request.' ) ; $ result = $ this -> updateSchema ( $ tables , true , $ allow_delete_fields ) ; $ result = array_get ( $ result , 0 , [ ] ) ; //  Any changes here should refresh cached schema $ this -> refreshCachedTables ( ) ; if ( $ return_schema ) { return $ this -> describeTable ( $ table ) ; } return $ result ; }
Update properties related to the table

@param string $table
@param array  $properties
@param bool   $allow_delete_fields
@param bool   $return_schema Return a refreshed copy of the schema from the database

@return array
@throws \Exception
Update properties related to the table