Skip to content

Commit d37ac6d

Browse files
committed
fix(database): call Migrate function after connection to make required tables
1 parent 584b07a commit d37ac6d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/spirit/main.go

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ func main() {
5555
Msg("Could not connect to database")
5656
}
5757

58+
if err := pg.Migrate(context.Background()); err != nil {
59+
log.Fatal().
60+
Err(err).
61+
Msg("Failed migrations; Could not create DOCUMENTS tables.")
62+
}
63+
5864
m := server.NewServer(&config.Config, pg)
5965

6066
m.MountMiddleware()

0 commit comments

Comments
 (0)