diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5dd7819ea587..57659f81cbdb 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1460,20 +1460,32 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. -#[allow(deprecated)] -pub type Migrations = ( - // 0.9.40 - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - // Unreleased - add new migrations here: - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - runtime_common::session::migration::ClearOldSessionStorage, -); +/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use super::*; + + pub type V0940 = ( + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + runtime_common::session::migration::ClearOldSessionStorage, + ); + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); +} /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index b94a882be420..7fe1e78c181f 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1416,20 +1416,33 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// All migrations that will run on the next runtime upgrade. /// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime upgrades in case governance decides to do so. -#[allow(deprecated)] -pub type Migrations = ( - // 0.9.40 - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - // Unreleased - add new migrations here: - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - runtime_common::session::migration::ClearOldSessionStorage, -); +/// This contains the combined migrations of the last 10 releases. It allows to skip runtime +/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use super::*; + + pub type V0940 = ( + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + runtime_common::session::migration::ClearOldSessionStorage, + ); + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); +} /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index bc2e42d6ad3b..a02b98f86ed1 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1477,12 +1477,25 @@ pub type UncheckedExtrinsic = /// All migrations that will run on the next runtime upgrade. /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. -pub type Migrations = ( - // Unreleased - add new migrations here: - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, -); +/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use super::*; + + pub type V0940 = (); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + ); + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); +} /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index c4fcbc35e545..e7675c34fc91 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1212,20 +1212,32 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. -#[allow(deprecated)] -pub type Migrations = ( - // 0.9.40 - clean_state_migration::CleanMigrate, - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - // Unreleased - add new migrations here: - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, -); +/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use super::*; + + pub type V0940 = ( + clean_state_migration::CleanMigrate, + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + ); + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); +} /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic =