Skip to content

[TM-337] More type safety in migration framework

Konstantin Ivanov requested to merge martoon/tm337-more-type-safety into master

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

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports