Author: jcouteau Date: 2010-04-23 09:45:07 +0200 (Fri, 23 Apr 2010) New Revision: 14 Log: Add doc about migration Added: trunk/src/site/rst/migration.rst Added: trunk/src/site/rst/migration.rst =================================================================== --- trunk/src/site/rst/migration.rst (rev 0) +++ trunk/src/site/rst/migration.rst 2010-04-23 07:45:07 UTC (rev 14) @@ -0,0 +1,34 @@ +Manage data migration using Wikitty +----------------------------------- + +Presentation +============ + +In Wikitty, migration is done each time you load an object. If an object is +present in the database in an old version, when it is loaded from the database, +it is automatically migrated to the new version. This way, you avoid costly +migration at initialisation. + +The only thing to bear in mind is that data which was not migrated is still +indexed in the old version and might not be returned by requests. If you need +the data to be indexed on the new version, you still can migrate all your +objects at initialisation by loading all the objects and store them. + +How migrate data properly in Wikitty +==================================== + +After your application launch and before any request, you should store all the +extensions needed by your application, in their last version. +Then you need to add to the registry all the specific migrations for extensions. + +You can now use your data properly, they will be migrated at loading time. + +If you want to migrate objects before using them (for requests purpose for +example), for each version, search all you objects, restore and then store +them:: + + search(Client) + restore(Client) + store(Client) + +Take care to the cost of the indexation compared to the data volume.