Skip to content

sqlite id bigint #6396

Description

@remco-pc

Bug Report

Q A
Version 4.0.2

Summary

when doing a column lookup throught:

$tables = Table::all($object, $name, $environment);
        $sanitized_table = preg_replace('/[^a-zA-Z0-9_]/', '', $options->table);
        if (in_array($sanitized_table, $tables, true)) {
            $columns = $schema_manager->listTableColumns($sanitized_table);
            if($columns){
                $list = [];
                foreach($columns as $column){
                    $record = $column->toArray();
                    $record['type'] = File::basename(get_class($column->getType()));
                    $list[]= $record;
                }
                return $list;
            }
        }

i get an array of columns.
But the id column which is defined as a bigint is turning into an integer. if i disable autoincrement it is threated as an bigint.
So when a bigint column has an autoincrement=true it will become an integer in sqlite.

Current behaviour

The bigint becomes silently an integer without noticing the builder

Expected behaviour

the id column should become a bigint with autoincrement=true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions