-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliases for DB software #413
Conversation
cmd/database/database_create.go
Outdated
if softwareVersion == "" && software == "MySQL" { | ||
softwareVersion = "8.0" | ||
validSoftwares := map[string][]string{ | ||
"mysql": {"mysql", "my", "sql"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should allow "my" and "sql"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd/database/database_create.go
Outdated
os.Exit(1) | ||
} | ||
|
||
if !softwareVersionIsValid { | ||
utility.Error("The provided software version is not valid") | ||
if softwareVersion == "" { | ||
utility.Error(fmt.Sprintf("No version specified for %s. Please provide a version using --version flag. For example, civo database create db-psql --software psql --version 14.", canonicalSoftwareName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the .
cmd/database/database_create.go
Outdated
} | ||
} | ||
|
||
if !softwareIsValid { | ||
utility.Error("The provided software name is not valid. Make sure you use correct capitalization (e.g. MySQL, PostgreSQL)") | ||
utility.Error("The provided software name is not valid. Make sure you use correct capitalization (e.g., MySQL, PostgreSQL)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change error message so it doesn't mislead the user to think capitalization is still needed.
cmd/database/database_create.go
Outdated
} | ||
} | ||
|
||
if !softwareIsValid { | ||
utility.Error("The provided software name is not valid. Make sure you use correct capitalization (e.g. MySQL, PostgreSQL)") | ||
utility.Error("The provided software name is not valid. Make sure you use correct capitalization (eg: MySQL, PostgreSQL)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused, if the change was to allow the usage of lowercase names of the database (ideally case insensitive) why do we still have this error asking for correct capitalization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes: #395