database stuff
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-01-13 18:33:38 +01:00
parent 1f08560ab0
commit aac0e0ab30
12 changed files with 234 additions and 12 deletions

View File

@ -0,0 +1,19 @@
package database
import (
"log"
//"time"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
func Migrate() {
dsn := ""
db, err := gorm.Open(postgres.Open(dsn))
if err != nil {
log.Fatalf("Unable to open database connection: %s", err)
}
db.AutoMigrate(&Person{})
}