collective flip migration removed, uniques added (#965)

This commit is contained in:
Ignacio Palacios
2022-02-08 13:13:06 +01:00
committed by GitHub
parent 16d3530fc9
commit f01c737e89
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>()
}
}