jsor / doctrine-postgis

Spatial and Geographic Data with PostGIS and Doctrine.
MIT License
209 stars 50 forks source link

srid option causes constant schema update #30

Closed HenningCash closed 7 years ago

HenningCash commented 7 years ago

We are using the doctrine postgis extension with Symfony 3.3. If we are running bin/console doctrine:schema:update --dump-sql|--force there is always one query that requires execution:

SELECT UpdateGeometrySRID('m_geo', 'geom', 3857);

The schema definition for this field is:

<field name="geom" type="geometry" >
    <options>
        <option name="srid">3857</option>
    </options>
</field>

This happens as soon you define the srid option. I guess this happens because the schema compare tool reads the option value from database as integer and the srid from the XML definition as string.

jsor commented 7 years ago

Thanks for the report. Could give the current master a try? This should be fixed in f1c0d131c0f3ca8715c648ba4eeae6c8e3013d45.

HenningCash commented 7 years ago

yes, thank you – works like a charm! 👍

jsor commented 7 years ago

Fix released in v1.4.1.