Skip to content
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

Set autoincrement for pk's in ORM #185

Open
margrietpalm opened this issue Jan 28, 2025 · 0 comments
Open

Set autoincrement for pk's in ORM #185

margrietpalm opened this issue Jan 28, 2025 · 0 comments
Assignees

Comments

@margrietpalm
Copy link
Contributor

During the conversion to geopackage primary keys get the AUTOINCREMENT property.

before:

select sql from sqlite_master where name = "surface_map";
CREATE TABLE "surface_map" (id INTEGER PRIMARY KEY NOT NULL,connection_node_id INTEGER,surface_id INTEGER,percentage FLOAT,tags TEXT,code VARCHAR(100),display_name VARCHAR(255), "geom" LINESTRING NOT NULL DEFAULT '')

after:

select sql from sqlite_master where name = "surface_map";
CREATE TABLE "surface_map" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "geom" LINESTRING NOT NULL, "connection_node_id" MEDIUMINT, "surface_id" MEDIUMINT, "percentage" REAL, "tags" TEXT, "code" TEXT, "display_name" TEXT)

This is not matched by the ORM

@margrietpalm margrietpalm self-assigned this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant