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

#[pallet::storage] can not use independently #11481

Closed
2 tasks done
yanganto opened this issue May 20, 2022 · 1 comment
Closed
2 tasks done

#[pallet::storage] can not use independently #11481

yanganto opened this issue May 20, 2022 · 1 comment

Comments

@yanganto
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

Base on the documentation to migration list as following,

A legacy data structure should be stored in another module as following, such that the migration can be performed.

mod migration {
    use super::*;
    #[frame_support::pallet] 
    pub mod v1 {
       #[pallet::storage]
       pub type Number<T> = StorageValue<_, u64>;
    }
}

However, the #[pallet::config] or possible more things are asked while compiling.
This is a bug to keep both version of data structure at the same time. Also this will be an issue for data migration with the storage described with#[pallet::storage].

Steps to reproduce

No response

@kianenigma
Copy link
Contributor

This is the macro that you are supposed to use to maintain the old storage formats around for migration:

#11387

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants