trigger 3.0 migration for beta versions
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Tue, 25 Nov 2008 12:33:26 +0100
changeset 138 ed8a7efaadb6
parent 137 7e45cf48c2f1
child 139 16aafc56a1ac
trigger 3.0 migration for beta versions
misc/migration/2.99.0_Any.py
misc/migration/3.0.0_Any.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/migration/2.99.0_Any.py	Tue Nov 25 12:33:26 2008 +0100
@@ -0,0 +1,11 @@
+from cubicweb import CW_MIGRATION_MAP
+
+for pk, in rql('Any K WHERE X is EProperty, X pkey IN (%s), X pkey K'
+              % ','.join("'system.version.%s'" % cube for cube in CW_MIGRATION_MAP)):
+    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})
+    print 'renamed', pk, 'to', newk
+
+add_entity_type('ECache')
--- a/misc/migration/3.0.0_Any.py	Tue Nov 25 12:33:15 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-from cubicweb import CW_MIGRATION_MAP
-
-for pk, in rql('Any K WHERE X is EProperty, X pkey IN (%s), X pkey K'
-              % ','.join("'system.version.%s'" % cube for cube in CW_MIGRATION_MAP)):
-    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})
-    print 'renamed', pk, 'to', newk
-
-add_entity_type('ECache')