collective flip migration removed, uniques added (#965) (#974)

Co-authored-by: Ignacio Palacios <ignacio.palacios.santos@gmail.com>
This commit is contained in:
Squirrel
2022-02-10 16:17:57 +00:00
committed by GitHub
parent cc7116dde6
commit 7a789ac2bc
2 changed files with 5 additions and 18 deletions
+1 -11
View File
@@ -785,19 +785,9 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(RemoveCollectiveFlip, UniquesV1Migration),
UniquesV1Migration,
>;
pub struct RemoveCollectiveFlip;
impl frame_support::traits::OnRuntimeUpgrade for RemoveCollectiveFlip {
fn on_runtime_upgrade() -> Weight {
use frame_support::storage::migration;
// Remove the storage value `RandomMaterial` from removed pallet `RandomnessCollectiveFlip`
migration::remove_storage_prefix(b"RandomnessCollectiveFlip", b"RandomMaterial", b"");
<Runtime as frame_system::Config>::DbWeight::get().writes(1)
}
}
pub struct UniquesV1Migration;
impl frame_support::traits::OnRuntimeUpgrade for UniquesV1Migration {
fn on_runtime_upgrade() -> Weight {
+4 -7
View File
@@ -769,16 +769,13 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
RemoveCollectiveFlip,
UniquesV1Migration,
>;
pub struct RemoveCollectiveFlip;
impl frame_support::traits::OnRuntimeUpgrade for RemoveCollectiveFlip {
pub struct UniquesV1Migration;
impl frame_support::traits::OnRuntimeUpgrade for UniquesV1Migration {
fn on_runtime_upgrade() -> Weight {
use frame_support::storage::migration;
// Remove the storage value `RandomMaterial` from removed pallet `RandomnessCollectiveFlip`
migration::remove_storage_prefix(b"RandomnessCollectiveFlip", b"RandomMaterial", b"");
<Runtime as frame_system::Config>::DbWeight::get().writes(1)
pallet_uniques::migration::migrate_to_v1::<Runtime, _, Uniques>()
}
}