Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Sort migrations by release #7168

Merged
merged 5 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,20 +1460,32 @@ impl Get<Perbill> 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<Runtime>,
// Unreleased - add new migrations here:
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
runtime_common::session::migration::ClearOldSessionStorage<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<Runtime>,
);
pub type V0941 = (); // Node only release - no migrations.
pub type V0942 = (
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
runtime_common::session::migration::ClearOldSessionStorage<Runtime>,
);

/// Unreleased migrations. Add new ones here:
pub type Unreleased = ();
}

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
41 changes: 27 additions & 14 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,20 +1416,33 @@ impl Get<Perbill> 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<Runtime>,
// Unreleased - add new migrations here:
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
runtime_common::session::migration::ClearOldSessionStorage<Runtime>,
);
/// 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<Runtime>,
);
pub type V0941 = (); // Node only release - no migrations.
pub type V0942 = (
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
runtime_common::session::migration::ClearOldSessionStorage<Runtime>,
);

/// Unreleased migrations. Add new ones here:
pub type Unreleased = ();
}

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
25 changes: 19 additions & 6 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>,
pallet_offences::migration::v1::MigrateToV1<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 = ();
pub type V0941 = (); // Node only release - no migrations.
pub type V0942 = (
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
);

/// Unreleased migrations. Add new ones here:
pub type Unreleased = ();
}

/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Expand Down
40 changes: 26 additions & 14 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,20 +1212,32 @@ impl Get<Perbill> 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<Runtime>,
// Unreleased - add new migrations here:
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<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 = (
clean_state_migration::CleanMigrate,
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
);
pub type V0941 = (); // Node only release - no migrations.
pub type V0942 = (
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
);

/// Unreleased migrations. Add new ones here:
pub type Unreleased = ();
}

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down