Restore initial admin password when running photoprism reset
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
b3bb2883fc
commit
b476916936
1 changed files with 8 additions and 3 deletions
|
@ -51,9 +51,14 @@ func resetAction(ctx *cli.Context) error {
|
|||
|
||||
log.Infoln("dropping existing tables")
|
||||
tables.Drop()
|
||||
log.Infoln("creating new tables")
|
||||
tables.Migrate()
|
||||
tables.WaitForMigration()
|
||||
|
||||
log.Infoln("restoring default schema")
|
||||
entity.MigrateDb()
|
||||
|
||||
if conf.AdminPassword() != "" {
|
||||
log.Infoln("restoring initial admin password")
|
||||
entity.Admin.InitPassword(conf.AdminPassword())
|
||||
}
|
||||
|
||||
log.Infof("database reset completed in %s", time.Since(start))
|
||||
|
||||
|
|
Loading…
Reference in a new issue