Bug report #5938

Updated by Luigi Pirelli almost 3 years ago

When a postgis table with a primary key + autoincrement field is imported in sqlite with the offline plugin, the schema is a little bit different:



<pre>

Table « public.XXXX



Column | Type | Modificateurs

----------------+------------------+------------------------------------------------------------------------------------------

ogc_fid | integer | not NULL by default, nextval('public.XXXX_ogc_fid_seq'::regclass)

geom | geometry |

identifiant | character(16) |

numero | character(10) |

type | character(50) |

name | character(50) |

longueur | double precision |

Index :

"XXXX_pk" PRIMARY KEY, btree (ogc_fid)

"XXXX_geom_idx" gist (geom)

Contraintes de vérification :

"enforce_dims_geom" CHECK (st_ndims(geom) = 2)

"enforce_geotype_geom" CHECK (geometrytype(geom) = 'LINESTRING'::text OR geom IS NULL)

"enforce_srid_geom" CHECK (srid(geom) = 21781)

</pre>



<pre>

CREATE TABLE 'XXXX' (

'ogc_fid' INTEGER,

'identifiant' TEXT,

'numero' TEXT,

'type' TEXT,

'name' TEXT,

'longueur' REAL,

"Geometry" LINESTRING

)

</pre>



"PRIMARY KEY" and "AUTOINCREMENT" is missing. In that case it should be better to not import back this field in the postgis table, but if it is not possible the sqlite scheme is not correct and the user need to define ogc_fid field value when editing offline.

Back