Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Can't dump tables with GIS types in MySQL #124

Open
ghost opened this issue Aug 27, 2013 · 1 comment
Open

Can't dump tables with GIS types in MySQL #124

ghost opened this issue Aug 27, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 27, 2013

I'm using MySQL and have a table with a MULTIPOLYGON type. It seems like schema_plus can't dump the table definition as it has no knowledge of the types to use, though I'm not sure.

Perhaps support for dazuma/rgeo or dazuma/activerecord-mysql2spatial-adapter would work?

@ghost
Copy link
Author

ghost commented Aug 27, 2013

A bit of digging has given me a bit more understanding about why this doesn't work:

The ActiveRecord SchemaDumper class does a lookup for the applicable types here, which checks in this hash for valid types.

So I think a number of things would have to be done to get this working. The activerecord-mysql2spatial-adapter's MainAdapter's class would have to somehow inform the SchemaDumper of the new types. There would also have to be some work done in schema_plus to support the Mysql2SpatialAdapter, perhaps delegating mostly to the existing Mysql2Adapter, but with specific logic dealing with the :spatial types.

Not sure how it would all fit together though, especially since the activerecord-mysql2spatial-adapter doesn't even support Rails 4 right now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants