MCPcopy
hub / github.com/writefreely/writefreely / Migrate

Function Migrate

app.go:750–760  ·  view source on GitHub ↗

Migrate runs all necessary database migrations.

(apper Apper)

Source from the content-addressed store, hash-verified

748
749// Migrate runs all necessary database migrations.
750func Migrate(apper Apper) error {
751 apper.LoadConfig()
752 connectToDatabase(apper.App())
753 defer shutdown(apper.App())
754
755 err := migrations.Migrate(migrations.NewDatastore(apper.App().db.DB, apper.App().db.driverName))
756 if err != nil {
757 return fmt.Errorf("migrate: %s", err)
758 }
759 return nil
760}
761
762// ResetPassword runs the interactive password reset process.
763func ResetPassword(apper Apper, username string) error {

Callers 2

migrateDBActionFunction · 0.92
legacyActionsFunction · 0.92

Calls 6

MigrateFunction · 0.92
NewDatastoreFunction · 0.92
connectToDatabaseFunction · 0.85
shutdownFunction · 0.85
LoadConfigMethod · 0.65
AppMethod · 0.65

Tested by

no test coverage detected