phinx icon indicating copy to clipboard operation
phinx copied to clipboard

PostgresAdapter::getColumns does not fully define postgis columns

Open MasterOdin opened this issue 6 years ago • 2 comments

The getColumns function for the PostgresAdapter does not handle geometric or geographic types very well, missing in capturing the defined shape, as well as set coordinate system. This is due to the fact that this information is not set in the information_schema.columns table, but rather Postgis defines two secondary tables geometry_columns and geography_columns tables. While cycling through each column, if the type is geography or geometry, query the above tables as appropriate (e.g. SELECT * FROM public.geography_columns WHERE f_table_schema = %s AND f_table_name = %s).

MasterOdin avatar Dec 22 '19 14:12 MasterOdin

I this still open?

dereuromark avatar Apr 11 '20 06:04 dereuromark

Yes, though I will probably make a new issue that combines this one and #1506, as the geometry handling in phinx needs quite a bit of work that should probably be done all at the same time, across the various adapters that support geometries. I've started and stopped a couple of times, never quite finding the right amount of time to get this done.

Leaving this open until such an issue is made though.

MasterOdin avatar Apr 11 '20 16:04 MasterOdin