更新若干功能
This commit is contained in:
3
app.go
3
app.go
@@ -111,6 +111,7 @@ func (a *App) startup(ctx context.Context) {
|
||||
}
|
||||
a.store = s
|
||||
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: defaultPath, DatabasePath: c.DatabasePath}
|
||||
a.applyPackagedSyncConfig()
|
||||
a.store.Log("info", "系统", "应用程序启动", "")
|
||||
a.store.Log("info", "数据库", "桌面运行时已连接", s.path)
|
||||
}
|
||||
@@ -146,6 +147,7 @@ func (a *App) InitializeDatabase(path string) (BootstrapStatus, error) {
|
||||
return a.bootstrap, e
|
||||
}
|
||||
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: a.bootstrap.DefaultPath, DatabasePath: s.path}
|
||||
a.applyPackagedSyncConfig()
|
||||
a.store.Log("info", "数据库", "数据库初始化成功", s.path)
|
||||
return a.bootstrap, nil
|
||||
}
|
||||
@@ -604,6 +606,7 @@ func (a *App) MigrateDatabase(target string) error {
|
||||
return coded("BOOTSTRAP_WRITE_FAILED", e)
|
||||
}
|
||||
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: a.bootstrap.DefaultPath, DatabasePath: target}
|
||||
a.applyPackagedSyncConfig()
|
||||
a.store.Log("info", "数据库", "数据库迁移成功", target)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user