Skip to content

Commit 5342d4e

Browse files
Prometheus2677FPiety0521
authored and
FPiety0521
committed
Give positive feedback when dropping schema
1 parent 7c0b400 commit 5342d4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/cli/main.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,15 @@ Database drivers: `+strings.Join(database.List(), ", ")+"\n")
227227
}
228228

229229
case "drop":
230-
log.Println("Are you sure you want to drop the entire database? [y/N]")
230+
log.Println("Are you sure you want to drop the entire database schema? [y/N]")
231231
var response string
232232
fmt.Scanln(&response)
233233
response = strings.ToLower(strings.TrimSpace(response))
234234

235-
if response != "y" {
236-
log.fatal("Aborted dropping the entire database")
237-
os.Exit(1)
235+
if response == "y" {
236+
log.Println("Dropping the entire database schema")
237+
} else {
238+
log.fatal("Aborted dropping the entire database schema")
238239
}
239240

240241
if migraterErr != nil {

0 commit comments

Comments
 (0)