MCPcopy
hub / github.com/writefreely/writefreely / CreateSchema

Function CreateSchema

app.go:738–747  ·  view source on GitHub ↗

CreateSchema creates all database tables needed for the application.

(apper Apper)

Source from the content-addressed store, hash-verified

736
737// CreateSchema creates all database tables needed for the application.
738func CreateSchema(apper Apper) error {
739 apper.LoadConfig()
740 connectToDatabase(apper.App())
741 defer shutdown(apper.App())
742 err := adminInitDatabase(apper.App())
743 if err != nil {
744 return err
745 }
746 return nil
747}
748
749// Migrate runs all necessary database migrations.
750func Migrate(apper Apper) error {

Callers 2

initDBActionFunction · 0.92
legacyActionsFunction · 0.92

Calls 5

connectToDatabaseFunction · 0.85
shutdownFunction · 0.85
adminInitDatabaseFunction · 0.85
LoadConfigMethod · 0.65
AppMethod · 0.65

Tested by

no test coverage detected