misc/migration/3.9.0_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 23 Sep 2011 12:23:09 +0200
branchstable
changeset 7843 3b51806da60b
parent 5768 1e73a466aa69
permissions -rw-r--r--
[rqlrewrite] if inlined relation has to be moved to a subquery, take care of the object of the relation (closes #1945725) As the object of the relation is moved to the subquery, all variables/relations representing some of its attributes or inlined relations should be moved there as well. This avoid error such as "BadRQLQuery: variable AF should be selected by the subquery" on security insertion.

if repo.system_source.dbdriver == 'postgres':
    sql('ALTER TABLE appears ADD COLUMN weight float')
    sql('UPDATE appears SET weight=1.0 ')