|
Could you let me know how I add another migration in this part? I just added a function |
Answered by
minshao
Apr 21, 2023
Replies: 4 comments 9 replies
let version_from = "0.4"; // this is the version that we'd like to migrate from
let version_to = "0.5";// this is the version that we'd like to migrate to
let version_to_next = "0.6.0-alpha"; // the upper boundary so that we are covering all "{version_to}.*"
let migration = vec![(
VersionReq::parse(">=0.2,<0.5.0-alpha").expect("valid version requirement"),
Version::parse("0.4.0").expect("valid version"),
migrate_0_2_to_0_3,
), (
VersionReq::parse(format!(">={version_from},<{version_to_next}")).expect("valid version requirement"),
Version::parse(format!("{version_to}")).expect("valid version"),
migrate_FROM_to_TO, // migration function name, `migrate_0_4_to_0_5` in this case,
)];With this setting, it should migrate. Let me know if there's any problem~ |
5 replies
|
The current code writes like the below, But, according to what you explained to me, should it be modified to the following? |
1 reply
|
In sum, is this right? |
1 reply
|
Sorry for bothering you, but could you explain what |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It should work, and the following might be simpler~