Skip to content

Commit

Permalink
bump storage versions
Browse files Browse the repository at this point in the history
  • Loading branch information
renauter committed Dec 5, 2023
1 parent 3574ed0 commit 15f42e1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions substrate-node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ pub type Executive = frame_executive::Executive<
type Migrations = (
pallet_tfgrid::migrations::v17::FixFarmPublicIps<Runtime>,
pallet_tft_bridge::migrations::v2::MigrateBurnTransactionsV2<Runtime>,
migrations::update_storage_version::UpdateStorageVersion,
);

// follows Substrate's non destructive way of eliminating otherwise required
Expand Down
3 changes: 2 additions & 1 deletion substrate-node/runtime/src/migrations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod remove_sudo;
pub mod tfgrid_v15_smart_contract_v8;
pub mod remove_sudo;
pub mod update_storage_version;
10 changes: 10 additions & 0 deletions substrate-node/runtime/src/migrations/update_storage_version.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub struct UpdateStorageVersion;
impl frame_support::traits::OnRuntimeUpgrade for UpdateStorageVersion {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
frame_support::pallet_prelude::StorageVersion::new(1).put::<crate::Balances>();
frame_support::pallet_prelude::StorageVersion::new(4).put::<crate::Scheduler>();
frame_support::pallet_prelude::StorageVersion::new(1).put::<crate::Historical>();

frame_support::weights::Weight::from_all(3)
}
}

0 comments on commit 15f42e1

Please sign in to comment.