mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-02-05 01:53:28 +01:00
Support offline upgrade up to v1.12.7
This commit is contained in:
parent
c321fdb9c0
commit
463553988c
@ -44,9 +44,9 @@ impl OfflineUpgrade {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FIRST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.9.0";
|
const FIRST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.9.0";
|
||||||
const LAST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.12.5";
|
const LAST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.12.7";
|
||||||
const FIRST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.10.0";
|
const FIRST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.10.0";
|
||||||
const LAST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.12.5";
|
const LAST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.12.7";
|
||||||
|
|
||||||
let upgrade_list = [
|
let upgrade_list = [
|
||||||
(
|
(
|
||||||
@ -73,7 +73,7 @@ impl OfflineUpgrade {
|
|||||||
("1", "10", _) => 1,
|
("1", "10", _) => 1,
|
||||||
("1", "11", _) => 2,
|
("1", "11", _) => 2,
|
||||||
("1", "12", "0" | "1" | "2") => 3,
|
("1", "12", "0" | "1" | "2") => 3,
|
||||||
("1", "12", "3" | "4" | "5") => no_upgrade,
|
("1", "12", "3" | "4" | "5" | "6" | "7") => no_upgrade,
|
||||||
_ => {
|
_ => {
|
||||||
bail!("Unsupported current version {current_major}.{current_minor}.{current_patch}. Can only upgrade from versions in range [{}-{}]",
|
bail!("Unsupported current version {current_major}.{current_minor}.{current_patch}. Can only upgrade from versions in range [{}-{}]",
|
||||||
FIRST_SUPPORTED_UPGRADE_FROM_VERSION,
|
FIRST_SUPPORTED_UPGRADE_FROM_VERSION,
|
||||||
@ -87,7 +87,7 @@ impl OfflineUpgrade {
|
|||||||
("1", "10", _) => 0,
|
("1", "10", _) => 0,
|
||||||
("1", "11", _) => 1,
|
("1", "11", _) => 1,
|
||||||
("1", "12", "0" | "1" | "2") => 2,
|
("1", "12", "0" | "1" | "2") => 2,
|
||||||
("1", "12", "3" | "4" | "5") => 3,
|
("1", "12", "3" | "4" | "5" | "6" | "7") => 3,
|
||||||
(major, _, _) if major.starts_with('v') => {
|
(major, _, _) if major.starts_with('v') => {
|
||||||
bail!("Target version must not starts with a `v`. Instead of writing `v1.9.0` write `1.9.0` for example.")
|
bail!("Target version must not starts with a `v`. Instead of writing `v1.9.0` write `1.9.0` for example.")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user