|Re: Model Migration: How to migrate repository models? [message #667343 is a reply to message #667192]
||Thu, 28 April 2011 09:02
| Maximilian Koegel
Registered: July 2009
no, you are not overlooking something obvious, you are looking at lack
of documentation ;). But I am happy to help you with this issue and
based on our interaction I will add documentation for this feature in
The migration feature of EMFStore can be installed from the update site.
It is optional and it integrates EMFStore with COPE/Edapt. EMFStore
(client and server) will automatically migrate existing models with
registered COPE/Edapt migrators as required. To determine the current
model version of your implementation you will need to register an
extension for the extension point "modelversion" in
org.unicase.emfstore. On initialization of the server and client the
current implementation´s model version will be stored. If a client or
server start up, they will compare the persisted version number with the
current implementation´s version number registered at the mentioned
extension point. If the numbers do differ than EMFStore will call Cope
to migrate the models instances. For example: If the persisted version
number is 1 and the current implementation´s version number is 3,
EMFStore will call COPE and ask for a migration from 1 to 3. This also
implies, you have to keep in sync the version number at the extension
point and the cope versions.
It would be quite easy to use COPE in a different way with EMFStore, but
it is not implemented yet: COPE can derive the version number and
necessary migration steps from the models namespace URIs, if you change
the URIs with every release. With this approach it would be possible to
support multiple models in different versions and without registering a
model version extension.
To get a simple example running with the current implementation:
1. Add your model plugin to EMFStore and create a model instance.
2. Change the Ecore and generate a migrator with Cope.
3. The migrator plugin should now consist of 1 migration step
4. Add the migration plugin and COPE Migration feature to your Launch
5. Add an extension in your model plugin to register version number "1"
for your model implementation:
name="X Model Version"
6. Restart client and server, they will automatically migrate your model
instance on startup.
If you have any more questions or need help, do not hesitate to ask me
or contact me on Skype.
Am 27.04.2011 12:26, schrieb Philipp H.:
> I want to test the model migration feature of EMFStore. I already played
> with COPE/Edapt and successfully migrate some models, but that was
> without EMFStore.
> I want to migrate the models in the EMFStore repository, but I can't
> find out the way it works. Is there any button for starting the
> migration (model migrator is already generated) in the EMFStore
> Navigator View or anywhere else? Or should I do it programmatically? I
> didn't find any snippet or tutorial.
> Do I overlook something obvious?
> I'm looking forward to any response.
> Best Regards
Powered by FUDForum
. Page generated in 0.03826 seconds