geoalchemy/geoalchemy2 — pull request #81 by lmb (2014-07-11 11:27:43+00:00)
Title: Create indices on GIS types as a constraint on the parent object

Right now, using Geoalchemy2 together with alembic is problematic, since ga2 creates indices by directly emitting SQL during the DDL generation stage. alembic does not pick this up obviously, and constantly tries to delete the spatial indices when generating migrations.

This pull request moves index creation into the GIS types themselves, making sure that the proper indices appear in the table / model metadata, which is what alembic uses to create migration scripts.

Let me know if I haven't followed your code guidelines fully. I ran all tests and they checked out.