Skip to content

Commit 16dae64

Browse files
Remove old migrations and clear pallet storage (#1352)
* Remove old migrations and clear pallet storage * Reintroduce benchmark migration * Fix formatting --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent ae0afe9 commit 16dae64

File tree

2 files changed

+24
-672
lines changed

2 files changed

+24
-672
lines changed

runtime/common/src/lib.rs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,35 @@ macro_rules! decl_common_types {
8686
generic, DispatchError, DispatchResult, RuntimeDebug, SaturatedConversion,
8787
};
8888
use zeitgeist_primitives::traits::{DeployPoolApi, DistributeFees, MarketCommonsPalletApi};
89-
use zrml_market_commons::migrations::{MigrateDisputeMechanism, RemoveMarkets};
9089

9190
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
9291

9392
type Address = sp_runtime::MultiAddress<AccountId, ()>;
9493

95-
type Migrations =
96-
(RemoveMarkets<Runtime, RemovableMarketIds>, MigrateDisputeMechanism<Runtime>);
94+
parameter_types! {
95+
pub const CampaignAssetsPalletStr: &'static str = "CampaignAssets";
96+
pub const CustomAssetsPalletStr: &'static str = "CustomAssets";
97+
pub const MarketAssetsPalletStr: &'static str = "MarketAssets";
98+
pub const LiquidityMiningPalletStr: &'static str = "LiquidityMining";
99+
pub const RikiddoPalletStr: &'static str = "Rikiddo";
100+
pub const SimpleDisputesPalletStr: &'static str = "SimpleDisputes";
101+
}
102+
103+
type RemoveCustomAssets = RemovePallet<CustomAssetsPalletStr, RocksDbWeight>;
104+
type RemoveCampaignAssets = RemovePallet<CampaignAssetsPalletStr, RocksDbWeight>;
105+
type RemoveMarketAssets = RemovePallet<MarketAssetsPalletStr, RocksDbWeight>;
106+
type RemoveLiquidityMining = RemovePallet<LiquidityMiningPalletStr, RocksDbWeight>;
107+
type RemoveRikiddo = RemovePallet<RikiddoPalletStr, RocksDbWeight>;
108+
type RemoveSimpleDisputes = RemovePallet<SimpleDisputesPalletStr, RocksDbWeight>;
109+
110+
type Migrations = (
111+
RemoveCustomAssets,
112+
RemoveCampaignAssets,
113+
RemoveMarketAssets,
114+
RemoveLiquidityMining,
115+
RemoveRikiddo,
116+
RemoveSimpleDisputes,
117+
);
97118

98119
pub type Executive = frame_executive::Executive<
99120
Runtime,

0 commit comments

Comments
 (0)