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

Name standard for pallet's storage migrations functions? #14609

Open
2 tasks done
flipchan opened this issue Jul 21, 2023 · 1 comment
Open
2 tasks done

Name standard for pallet's storage migrations functions? #14609

flipchan opened this issue Jul 21, 2023 · 1 comment
Labels
J0-enhancement An additional feature request. J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@flipchan
Copy link

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.

Motivation

I'm currently working on a way to "auto find" storage migrations that have already been implemented for pallets.
Github issue:
uptest-sc/uptest#64

Request

Hello Everyone,

I'm currently trying to make a feature for

It would be amazing if there could be a naming standard or a recommended function name format for storage migrations. As of today their is no "rfc"-like standard for naming the functions that trigger storage migrations.
For examples, pallet-balances v0 -> v1:
migration_balances_v01.rs

Is their any naming guide lines for naming migration functions at the moment?

Moderator: If this issue belongs more on stackexchange, let me know and I shall move it. I thought this would be best suited to post here.

Thanks

Solution

No response

Are you willing to help with this request?

Yes!

@flipchan flipchan added the J0-enhancement An additional feature request. label Jul 21, 2023
@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Jul 21, 2023
@ggwpez
Copy link
Member

ggwpez commented Jul 21, 2023

What? Old migrations are deleted from the code-base. The way to check if a pallet is migrated to the latest version is to compare its code-version to the on-chain version. If they differ then a migration is missing.
Searching through the source code by grepping strings is not going to do this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

2 participants