misc/migration/3.14.0_Any.py
changeset 10589 7c23b7de2b8d
parent 8483 4ba11607d84a
equal deleted inserted replaced
10588:fdaa0e4b7eaf 10589:7c23b7de2b8d
       
     1 from __future__ import print_function
       
     2 
     1 config['rql-cache-size'] = config['rql-cache-size'] * 10
     3 config['rql-cache-size'] = config['rql-cache-size'] * 10
     2 
     4 
     3 add_entity_type('CWDataImport')
     5 add_entity_type('CWDataImport')
     4 
     6 
     5 from cubicweb.schema import CONSTRAINTS, guess_rrqlexpr_mainvars
     7 from cubicweb.schema import CONSTRAINTS, guess_rrqlexpr_mainvars
     8                    'NOT X value ~= ";%"').entities():
    10                    'NOT X value ~= ";%"').entities():
     9     expression = rqlcstr.value
    11     expression = rqlcstr.value
    10     mainvars = guess_rrqlexpr_mainvars(expression)
    12     mainvars = guess_rrqlexpr_mainvars(expression)
    11     yamscstr = CONSTRAINTS[rqlcstr.type](expression, mainvars)
    13     yamscstr = CONSTRAINTS[rqlcstr.type](expression, mainvars)
    12     rqlcstr.cw_set(value=yamscstr.serialize())
    14     rqlcstr.cw_set(value=yamscstr.serialize())
    13     print 'updated', rqlcstr.type, rqlcstr.value.strip()
    15     print('updated', rqlcstr.type, rqlcstr.value.strip())