Skip to content

Commit

Permalink
Add substrate migrations (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
vovac12 authored Apr 5, 2023
1 parent 9fcc5f8 commit 653bde3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions runtime/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ impl Get<Vec<(AccountId, BlockNumber)>> for GetPoolsWithBlock {
}
}

pub struct EmptyAccountList;

impl Get<Vec<AccountId>> for EmptyAccountList {
fn get() -> Vec<AccountId> {
Default::default()
}
}

pub type Migrations = (
farming::migrations::v2::Migrate<Runtime, GetPoolsWithBlock>,
pallet_staking::migrations::v10::MigrateToV10<Runtime>,
Expand All @@ -31,4 +39,10 @@ pub type Migrations = (
pallet_scheduler::migration::v3::MigrateToV4<Runtime>,
pallet_democracy::migrations::v1::Migration<Runtime>,
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
pallet_scheduler::migration::v4::CleanupAgendas<Runtime>,
pallet_grandpa::migrations::CleanupSetIdSessionMap<Runtime>,
pallet_staking::migrations::v13::MigrateToV13<Runtime>,
pallet_election_provider_multi_phase::migrations::v1::MigrateToV1<Runtime>,
// We don't need this migration, so pass empty account list
pallet_balances::migration::MigrateManyToTrackInactive<Runtime, EmptyAccountList>,
);

0 comments on commit 653bde3

Please sign in to comment.