"""Adding geom geographical index to markers and discussions

Revision ID: 4c4b79f8c4a
Revises: 10ffa15c5d24
Create Date: 2018-03-07 13:49:06.780319

"""
# revision identifiers, used by Alembic.
revision = '4c4b79f8c4a'
down_revision = '10ffa15c5d24'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import geoalchemy2 as ga


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    conn = op.get_bind()
    conn.execute('CREATE INDEX geom_gix ON markers USING GIST (geography(geom));')
    conn.execute('CREATE INDEX discussions_gix ON discussions USING GIST (geography(geom));')

    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    conn = op.get_bind()
    conn.execute('DROP INDEX geom_gix;')
    conn.execute('DROP INDEX discussions_gix;')
    ### end Alembic commands ###

Add geon gix idx to markers and discussions
Add geon gix idx to markers and discussions
