misc/migration/3.14.0_Any.py
author Rémi Cardona <remi.cardona@logilab.fr>
Fri, 28 Nov 2014 10:16:37 +0100
changeset 10069 e2a760b9fb93
parent 8483 4ba11607d84a
child 10589 7c23b7de2b8d
permissions -rw-r--r--
[web] Slight tweak on jQueryUI's colors on links (related to #4564046) Follow up to commit 16f550b48d57 which was somewhat brutal. This change only overrides jQueryUI's CSS rules inside tab panes and leaves actual tab buttons alone.

config['rql-cache-size'] = config['rql-cache-size'] * 10

add_entity_type('CWDataImport')

from cubicweb.schema import CONSTRAINTS, guess_rrqlexpr_mainvars
for rqlcstr in rql('Any X,XT,XV WHERE X is CWConstraint, X cstrtype XT, X value XV,'
                   'X cstrtype XT, XT name IN ("RQLUniqueConstraint","RQLConstraint","RQLVocabularyConstraint"),'
                   'NOT X value ~= ";%"').entities():
    expression = rqlcstr.value
    mainvars = guess_rrqlexpr_mainvars(expression)
    yamscstr = CONSTRAINTS[rqlcstr.type](expression, mainvars)
    rqlcstr.cw_set(value=yamscstr.serialize())
    print 'updated', rqlcstr.type, rqlcstr.value.strip()