fromTable example

/** * @param array|string $field * * @return array|string|null */
    protected function _alterTable(string $alterType, string $table$field)
    {
        switch ($alterType) {
            case 'DROP':
                $sqlTable = new Table($this->db, $this);

                $sqlTable->fromTable($table)
                    ->dropColumn($field)
                    ->run();

                return '';

            case 'CHANGE':
                (new Table($this->db, $this))
                    ->fromTable($table)
                    ->modifyColumn($field)
                    ->run();

                
Home | Imprint | This part of the site doesn't use cookies.