public function importTable($table)
    {
        $this->table($table);
        $has_fields = false;
        foreach ($this->describeTable($table) as $row) {
            $has_fields = true;
            if ($row['pk']) {
                $this->id($row['name']);
                continue;
            }

            $type = $this->getModelFieldType($row['type']);

            $this->field($row['name'], ['type'=>$type]);
        }

        return $has_fields;
    }
public function importTable($table)
    {
        $this->table($table);
        $has_fields = false;
        foreach ($this->describeTable($table) as $row) {
            $has_fields = true;
            if ($row['pk']) {
                $this->id($row['name']);
                continue;
            }

            $type = $this->getModelFieldType($row['type']);

            $this->field($row['name'], ['type'=>$type]);
        }

        return $has_fields;
    }
public function importTable ( $ table ) { $ this -> table ( $ table ) ; $ has_fields = false ; foreach ( $ this -> describeTable ( $ table ) as $ row ) { $ has_fields = true ; if ( $ row [ 'pk' ] ) { $ this -> id ( $ row [ 'name' ] ) ; continue ; } $ type = $ this -> getModelFieldType ( $ row [ 'type' ] ) ; $ this -> field ( $ row [ 'name' ] , [ 'type' => $ type ] ) ; } return $ has_fields ; }
Import fields from database into migration field config.

@param string $table

@return bool
Import fields from database into migration field config .