[TM-337] More type safety in migration framework
Description
The final set of adjustments for UStore migrations.
The main problem till now was that MigrationScript
does not remember versions os storage it converts between, so the developer is restricted to construct a correct migration but still can apply it to a wrong version of the contract. Now we can prevent that, at least in tests.
Some solutions taken here might be controversial, so please express your opinion.
Related issue(s)
https://issues.serokell.io/issue/TM-337
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Konstantin Ivanov