author | Laure Bourgois <Laure.Bourgois@logilab.fr> |
Wed, 26 Nov 2008 10:20:27 +0100 | |
changeset 149 | a7cd4296a85e |
parent 138 | ed8a7efaadb6 |
child 176 | 312024cbe717 |
permissions | -rw-r--r-- |
0 | 1 |
from cubicweb import CW_MIGRATION_MAP |
2 |
||
3 |
for pk, in rql('Any K WHERE X is EProperty, X pkey IN (%s), X pkey K' |
|
4 |
% ','.join("'system.version.%s'" % cube for cube in CW_MIGRATION_MAP)): |
|
5 |
cube = pk.split('.')[-1] |
|
6 |
newk = pk.replace(cube, CW_MIGRATION_MAP[cube]) |
|
7 |
rql('SET X pkey %(newk)s WHERE X pkey %(oldk)s', |
|
8 |
{'oldk': pk, 'newk': newk}) |
|
9 |
print 'renamed', pk, 'to', newk |
|
113
1091d8d63f51
[doc] add a level for better structure
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
0
diff
changeset
|
10 |
|
1091d8d63f51
[doc] add a level for better structure
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
0
diff
changeset
|
11 |
add_entity_type('ECache') |