-
Could you let me know how I add another migration in this part? I just added a function
|
Beta Was this translation helpful? Give feedback.
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~ |
Beta Was this translation helpful? Give feedback.
-
The current code writes like the below,
But, according to what you explained to me, should it be modified to the following?
|
Beta Was this translation helpful? Give feedback.
-
In sum, is this right?
|
Beta Was this translation helpful? Give feedback.
-
Sorry for bothering you, but could you explain what |
Beta Was this translation helpful? Give feedback.
It should work, and the following might be simpler~