We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a532109 + f09d859 commit 3c46e5dCopy full SHA for 3c46e5d
1 file changed
main.go
@@ -32,7 +32,9 @@ func main() {
32
}
33
34
// Create Todo model migrations.
35
- db.Create(&models.Todo{})
+ if err := db.AutoMigrate(&models.Todo{}); err != nil {
36
+ log.Fatalln("failed to run migrations:", err)
37
+ }
38
39
e := echo.New()
40
0 commit comments