Skip to content

Commit

Permalink
[pallet_uniques] adapt paritytech/polkadot-sdk#2687 (versioned migrat…
Browse files Browse the repository at this point in the history
…ion)
  • Loading branch information
bkontur committed Feb 3, 2024
1 parent 909e074 commit 808bb4c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ use frame_support::{
parameter_types,
traits::{
AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals,
InstanceFilter, OnRuntimeUpgrade, TransformOrigin,
InstanceFilter, TransformOrigin,
},
weights::{ConstantMultiplier, Weight},
PalletId,
Expand Down Expand Up @@ -884,19 +884,13 @@ pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>,
UniquesMigration,
// unreleased
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
);

/// Migration for Uniques to V1
pub struct UniquesMigration;

impl OnRuntimeUpgrade for UniquesMigration {
fn on_runtime_upgrade() -> Weight {
pallet_uniques::migration::migrate_to_v1::<Runtime, (), pallet_uniques::Pallet<Runtime>>()
}
}
pub type UniquesMigration = pallet_uniques::migration::MigrateV0ToV1<Runtime, ()>;

/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Expand Down

0 comments on commit 808bb4c

Please sign in to comment.