Currently, if you send a PUT request on a datastore with a totally different definition of the datastore (for example, migrating from a directory of shapefile to a pregen feature datastore), GeoServer accepts the request and you got a 200 return code.
But the GS configuration is totally broken then: the previously created feature types and layers are still listed but when you try to use them you got error messages.
Shouldn’t the endpoint raise an error when we try to change the type of a datastore with a PUT method?
Or just not cleaning them at all… Pretty common use case: migrate lots of separate JDBC stores from stand alone to JNDI, to save on connections. Different store factory, exactly the same feature types.
If one wants wipe out everything, it’s simple: delete the store with recurse first, then recreate everything anew.
Currently, if you send a PUT request on a datastore with a totally different definition of the datastore (for example, migrating from a directory of shapefile to a pregen feature datastore), GeoServer accepts the request and you got a 200 return code.
But the GS configuration is totally broken then: the previously created feature types and layers are still listed but when you try to use them you got error messages.
Shouldn’t the endpoint raise an error when we try to change the type of a datastore with a PUT method?
–
Alexandre Gacon
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this list:
Or just not cleaning them at all… Pretty common use case: migrate lots of separate JDBC stores from stand alone to JNDI, to save on connections. Different store factory, exactly the same feature types.
If one wants wipe out everything, it’s simple: delete the store with recurse first, then recreate everything anew.
Cheers
Andrea
Il dom 23 apr 2023, 18:31 Jody Garnett <jody.garnett@…84…> ha scritto:
The REST api is simple.
I would expect you are making that call as part of migrating a dataset from oracle to postgis and will be cleaning up the feature types next.
Currently, if you send a PUT request on a datastore with a totally different definition of the datastore (for example, migrating from a directory of shapefile to a pregen feature datastore), GeoServer accepts the request and you got a 200 return code.
But the GS configuration is totally broken then: the previously created feature types and layers are still listed but when you try to use them you got error messages.
Shouldn’t the endpoint raise an error when we try to change the type of a datastore with a PUT method?
–
Alexandre Gacon
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this list: