-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlite id bigint #6396
Comments
Please try to reproduce your issue using only DBAL APIs. |
When using doctrine schema manager i get an array of data describing the column definition of a sqlite db file. ($schema_manager->listTableColumns($sanitized_table)) When using a combination of bigint with auto increment it is of integer type. When i remove the auto increment, it becomes a bigint. [
{
"name": "id",
"type": "IntegerType",
"default": null,
"notnull": true,
"length": null,
"precision": null,
"scale": 0,
"fixed": false,
"unsigned": false,
"autoincrement": true,
"columnDefinition": null,
"comment": ""
},
... also i needed to do this: $record = $column->toArray();
$record['type'] = File::basename(get_class($column->getType())); the type doesnt have a to string defined which should and be the same as in the schema/ entitiy defined so we can validate the creation of the table the unsigned is false where it should be true, because of the autoincrement. {
"name": "id",
"type": "BigIntType",
"default": null,
"notnull": true,
"length": null,
"precision": null,
"scale": 0,
"fixed": false,
"unsigned": true,
"autoincrement": false,
"columnDefinition": null,
"comment": ""
}, |
@derrabus its |
Here #6411 is a PR with fix and test. |
Bug Report
Summary
when doing a column lookup throught:
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
The text was updated successfully, but these errors were encountered: