MCPcopy Index your code
hub / github.com/dnote/dnote / initDB

Function initDB

pkg/server/cmd/helpers.go:32–38  ·  view source on GitHub ↗
(dbPath string)

Source from the content-addressed store, hash-verified

30)
31
32func initDB(dbPath string) *gorm.DB {
33 db := database.Open(dbPath)
34 database.InitSchema(db)
35 database.Migrate(db)
36
37 return db
38}
39
40func getEmailBackend() mailer.Backend {
41 defaultBackend, err := mailer.NewDefaultBackend()

Callers 1

initAppFunction · 0.85

Calls 3

OpenFunction · 0.92
InitSchemaFunction · 0.92
MigrateFunction · 0.92

Tested by

no test coverage detected