Migration scripts best practice
Good afternoon.
I have a question about migration scripts: what are the best practices to maintain migration scripts? For example, we have a language with more than 50 migration scripts. We can't group them into different folders (because even virtual packages are ignored and all migration scripts displayed as a single list per language). We also can't remove them because our language has already a version and we have already created nodes that know about this version.
So my question is: how to deal with such kinds of issues?
Please sign in to leave a comment.
Hello,
I'm puzzled that you cannot organize MigrationScripts into virtual folders. Which version of MPS are you referring to?
Vaclav
Vaclav Pech, they organized only inside the project structure and NOT inside the menu of IDE. But the second one is more important because users can use migration ONLY from the menu.
If you are talking about the migration scripts in the migration aspect then you don't need to execute them from the menu. These migrations are automatically executed by MPS when it encounters models using an older version of your language.
A common practice is to keep the scripts around for a couple of releases of a language and then remove them. For instance keep the migration scripts for 3 releases of the language and then remove them because by then every user should be migrated anyway.