author | sylvain.thenault@logilab.fr |
Tue, 28 Apr 2009 19:09:37 +0200 | |
branch | tls-sprint |
changeset 1519 | 5cfc5cc1dd20 |
parent 1398 | 5fe84a5f7035 |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
from cubicweb import CW_MIGRATION_MAP for pk, in rql('Any K WHERE X is CWProperty, X pkey IN (%s), X pkey K' % ','.join("'system.version.%s'" % cube for cube in CW_MIGRATION_MAP), ask_confirm=False): cube = pk.split('.')[-1] newk = pk.replace(cube, CW_MIGRATION_MAP[cube]) rql('SET X pkey %(newk)s WHERE X pkey %(oldk)s', {'oldk': pk, 'newk': newk}, ask_confirm=False) print 'renamed', pk, 'to', newk add_entity_type('CWCache')