Bug 506226 - By default, MigrationParticipants should not be called when loading newer version
Summary: By default, MigrationParticipants should not be called when loading newer ver...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 4.1.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: Next   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 529263
  Show dependency tree
 
Reported: 2016-10-19 11:59 EDT by Florian Barbin CLA
Modified: 2018-09-03 08:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Barbin CLA 2016-10-19 11:59:19 EDT
The migration mechanism is triggered if at least one MigrationParticipant provides a migration for a newer version than the one loaded.
Each MigrationParticipant have to check whether it needs to perform its action according to the loading version. This check is necessary if a MigrationParticipant has been backported in a branch.
For instance, a migrationParticipant introduced in Sirius 4.1 but also backported in Sirius 4.0.2, needs to check whether the loaded version is older than 4.0.2. If the loading version is 4.0.3 for instance, there is no need to perform the migration again.

Most of the time, a migrationParticipant is introduced in only one version but the developer has to think about checking the loaded version. This check could be the default behavior. If the migrationParticipant is backported, an API should allow the developer to handle this case.
Comment 1 Pierre-Charles David CLA 2018-09-03 08:48:39 EDT
Moving to next version. This only impacts the Sirius developers (the only ones who write actual migrations), and it's too risky to touch to the migration mechanism as we are approaching 6.1.