github.com/cosmos/cosmos-sdk@v0.50.10/x/authz/keeper/migrations.go (about)

     1  package keeper
     2  
     3  import (
     4  	sdk "github.com/cosmos/cosmos-sdk/types"
     5  	v2 "github.com/cosmos/cosmos-sdk/x/authz/migrations/v2"
     6  )
     7  
     8  // Migrator is a struct for handling in-place store migrations.
     9  type Migrator struct {
    10  	keeper Keeper
    11  }
    12  
    13  // NewMigrator returns a new Migrator.
    14  func NewMigrator(keeper Keeper) Migrator {
    15  	return Migrator{keeper: keeper}
    16  }
    17  
    18  // Migrate1to2 migrates from version 1 to 2.
    19  func (m Migrator) Migrate1to2(ctx sdk.Context) error {
    20  	return v2.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc)
    21  }