Le 05/10/2015 13:26, [email protected] a écrit :
Hi,

We have a custom SQL query we need to run after each doctrine:schema:update. This query creates a custom PostgreSQL Gist index which we couldn't manage to create via Doctrine:

CREATE INDEX locations_gist_index
ON locations
USING gist
(location);

Unfortunately doctrine:schema:update always deletes this index, so we need to put it back after each run. How can we accomplish this? Any idea is appreciated. :) Is there a custom config we can add, should we override one of Doctrine's classes, should we try using an event, etc.

Thanks!

My advice would be to use doctrine migrations to control what gets created rather than using doctrine:schema:update. This gives you the possibility to customize the queries being run (it is also necessary to migrate the data during updates rather than just updating the schema and hoping that no change to data is necessary)

--
Christophe | Stof

--
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to