Skip to content

Commit 2ac7853

Browse files
lukewhritCopilot
andauthored
fix(database): run database migrations on startup
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 74c13f7 commit 2ac7853

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cmd/spacebin/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ func main() {
7575
}
7676

7777
// Perform migrations
78-
// if err := db.Migrate(context.Background()); err != nil {
79-
// log.Fatal().
80-
// Err(err).
81-
// Msg("Failed migrations; Could not create DOCUMENTS tables.")
82-
// }
78+
if err := db.Migrate(context.Background()); err != nil {
79+
log.Fatal().
80+
Err(err).
81+
Msg("Failed migrations; Could not create DOCUMENTS tables.")
82+
}
8383

8484
// Create a new server and register middleware, security headers, static files, and handlers
8585
m := server.NewServer(&config.Config, db)

0 commit comments

Comments
 (0)