feat(core): add migrations registering (#19370)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
This commit is contained in:
Julien Robert
2024-02-09 09:30:39 +00:00
committed by GitHub
co-authored by Facundo Medica
parent ac48269f98
commit e15a0de251
43 changed files with 432 additions and 280 deletions
+2
View File
@@ -49,6 +49,8 @@ Since these migrations are functions that need access to a Keeper's store, use a
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/migrations.go
```
<!-- TODO v0.51: explain the new way with core -->
## Writing Migration Scripts
To define the functionality that takes place during an upgrade, write a migration script and place the functions in a `migrations/` directory. For example, to write migration scripts for the bank module, place the functions in `x/bank/migrations/`. Use the recommended naming convention for these functions. For example, `v2bank` is the script that migrates the package `x/bank/migrations/v2`: