Skip to content

Commit

Permalink
feat: validation for database versions in schema.json [skip ci] (dd…
Browse files Browse the repository at this point in the history
  • Loading branch information
stasadev authored Oct 10, 2024
1 parent e5bcf28 commit 08589a8
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions pkg/ddevapp/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,85 @@
"description": "Specify the database version to use.",
"type": "string"
}
},
"if": {
"properties": {
"type": {
"const": "mariadb"
}
}
},
"then": {
"properties": {
"version": {
"enum": [
"5.5",
"10.0",
"10.1",
"10.2",
"10.3",
"10.4",
"10.5",
"10.6",
"10.7",
"10.8",
"10.11",
"11.4"
]
}
}
},
"else": {
"if": {
"properties": {
"type": {
"const": "mysql"
}
}
},
"then": {
"properties": {
"version": {
"enum": [
"5.5",
"5.6",
"5.7",
"8.0"
]
}
}
},
"else": {
"if": {
"properties": {
"type": {
"const": "postgres"
}
}
},
"then": {
"properties": {
"version": {
"enum": [
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17"
]
}
}
},
"else": {
"not": {
"required": ["version"]
}
}
}
}
},
"dbimage_extra_packages": {
Expand Down

0 comments on commit 08589a8

Please sign in to comment.