Comment 3 for bug 1314680

Revision history for this message
Anaƫl Closson (openerp) (acl-openerp) wrote :

Hi Laurent,

As explained in the sent mail, you should use the init method. Using `migrate` for such use isn't a good idea and that's why it has been removed.

Why ? You create an index because your module makes usage of the related columns. It's relevant to add the index when you install the module with or without the migration scripts.

Beside this, having a call on migrate when installing force you the take care of that case in the migration scripts. Is it normal ? I don't think so.

So, I would check if the constraint is available in pg_indexes, and if not add the index.
See this message from the PostgreSQL mailing list for more information about it : http://<email address hidden>