diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 5dd7819ea5..57659f81cb 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/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/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index a003f6f2e2..7c06ee8490 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -1435,20 +1435,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/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index bc2e42d6ad..a02b98f86e 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/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/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index c4fcbc35e5..e7675c34fc 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/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 =