[book - #1251197] add a section in migration page for add_cube and add_cubes command stable
authorStephanie Marcu <stephanie.marcu@logilab.fr>
Wed, 15 Sep 2010 11:03:48 +0200
branchstable
changeset 6244 1c4ac1626f3c
parent 6243 c0ee416040fa
child 6245 e7e9d73d0c07
[book - #1251197] add a section in migration page for add_cube and add_cubes command
doc/book/en/devrepo/migration.rst
--- a/doc/book/en/devrepo/migration.rst	Wed Sep 15 11:00:55 2010 +0200
+++ b/doc/book/en/devrepo/migration.rst	Wed Sep 15 11:03:48 2010 +0200
@@ -91,6 +91,24 @@
 * `session`, repository session object
 
 
+New cube dependencies
+---------------------
+
+If your code depends on some new cubes, you have to add them in a migration
+script by using:
+
+* `add_cube(cube, update_database=True)`, add a cube.
+* `add_cubes(cubes, update_database=True)`, add a list of cubes.
+
+The `update_database` parameter is telling if the database schema
+should be updated or if only the relevant persistent property should be
+inserted (for the case where a new cube has been extracted from an
+existing one, so the new cube schema is actually already in there).
+
+If some of the added cubes are already used by an instance, they'll simply be
+silently skipped.
+
+
 Schema migration
 ----------------
 The following functions for schema migration are available in `repository`