IsValidDatabaseVersion checks if the version is valid for the provided database type
(dbType string, dbVersion string)
| 159 | |
| 160 | // IsValidDatabaseVersion checks if the version is valid for the provided database type |
| 161 | func IsValidDatabaseVersion(dbType string, dbVersion string) bool { |
| 162 | switch dbType { |
| 163 | case MariaDB: |
| 164 | return IsValidMariaDBVersion(dbVersion) |
| 165 | case MySQL: |
| 166 | return IsValidMySQLVersion(dbVersion) |
| 167 | case Postgres: |
| 168 | return IsValidPostgresVersion(dbVersion) |
| 169 | } |
| 170 | return false |
| 171 | } |
| 172 | |
| 173 | // GetValidDatabaseVersions returns a slice of valid versions with the format |
| 174 | // mariadb:10.5/mysql:5.7/postgres:14 |
no test coverage detected