Skip to content

Commit 1c793e7

Browse files
committed
fix password prompt for migratedb
1 parent 246596c commit 1c793e7

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<!-- ### Dependencies -->
1313
<!-- -->
1414

15+
## mytoken 0.3.2
16+
17+
- Fixed password prompt for migratedb
18+
1519
## mytoken 0.3.1
1620

1721
- Improved helper tools

cmd/mytoken-server/mytoken-migratedb/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"strings"
77
"time"
88

9+
"github.com/Songmu/prompter"
910
log "github.com/sirupsen/logrus"
1011
"github.com/zachmann/cli/v2"
1112
"golang.org/x/term"
@@ -107,6 +108,9 @@ var app = &cli.App{
107108
} else if !force {
108109
return fmt.Errorf("No mytoken servers specified. Please provide mytoken servers or use '-f' to force database migration.")
109110
}
111+
if dbConfig.Password == "" {
112+
dbConfig.Password = prompter.Password("Enter password")
113+
}
110114
dbConfig.ReconnectInterval = 60
111115
dbConfig.DBConf.Hosts = dbConfig.Hosts.Value()
112116
db.ConnectConfig(dbConfig.DBConf)

internal/model/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
const (
99
MAJOR = 0
1010
MINOR = 3
11-
FIX = 1
11+
FIX = 2
1212
DEV = false
1313
)
1414

0 commit comments

Comments
 (0)