misc/migration/bootstrapmigration_repository.py
changeset 1808 aa09e20dd8c0
parent 1501 c80ca83a382f
child 1952 8e19c813750d
--- a/misc/migration/bootstrapmigration_repository.py	Tue May 05 17:18:49 2009 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Thu May 14 12:48:11 2009 +0200
@@ -3,27 +3,30 @@
 it should only include low level schema changes
 
 :organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 
+if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0):
+   add_cube('card', update_database=False)
+
 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0):
     from cubicweb.server import schemaserial
     schemaserial.HAS_FULLTEXT_CONTAINER = False
-    cnx.set_shared_data('do-not-insert-is_instance_of', True)
-    add_attribute('ERType', 'fulltext_container')
+    session.set_shared_data('do-not-insert-is_instance_of', True)
+    add_attribute('CWRType', 'fulltext_container')
     schemaserial.HAS_FULLTEXT_CONTAINER = True
 
 
- 
+
 if applcubicwebversion < (2, 50, 0) and cubicwebversion >= (2, 50, 0):
-    cnx.set_shared_data('do-not-insert-is_instance_of', True)
+    session.set_shared_data('do-not-insert-is_instance_of', True)
     add_relation_type('is_instance_of')
     # fill the relation using an efficient sql query instead of using rql
     sql('INSERT INTO is_instance_of_relation '
 	'  SELECT * from is_relation')
     checkpoint()
-    cnx.set_shared_data('do-not-insert-is_instance_of', False)
+    session.set_shared_data('do-not-insert-is_instance_of', False)
 
 if applcubicwebversion < (2, 42, 0) and cubicwebversion >= (2, 42, 0):
     sql('ALTER TABLE entities ADD COLUMN mtime TIMESTAMP')
@@ -40,4 +43,4 @@
     sql('CREATE INDEX deleted_entities_dtime_idx ON deleted_entities(dtime)')
     sql('CREATE INDEX deleted_entities_extid_idx ON deleted_entities(extid)')
     checkpoint()
-   
+