sakaiproject/nakamura — pull request #646 by zathomas (2012-03-09 01:15:30+00:00)
Title: KERN-2625 fix discussion threads in a migrated sakai doc

The issue with the discussion widget is that the inbox relies on a few properties that have the message box path in them, including a hash of the path as a search index key called `sakai:messagestore`.

The remedy is to change the values of those properties while the migration is happening.

When the document is saved with the new structure, it will be indexed as well, allowing the discussion messages to be found by `/var/search/discussions/threaded.json`

This change depends on a change that Carl just put in:
https://github.com/sakaiproject/nakamura/pull/642

By the way, I'm getting good at loading a v1.1 environment and upgrading it to v1.2. You can continue to use Derby as well, and not lose your data. The following three steps are a one-time setup:

1. starting from scratch, startup a v1.1 jar
2. populate that environment with some documents for test
3. stop nakamura and `mv sling sling-1.1`

And then whenever you want to upgrade this environment, use this script:
https://gist.github.com/2004435

While you're testing migrations, the procedure is run the upgrade script, start nakamura, try migrating one or more docs, check the results, stop nakamura, repeat.