Begin migration to sqlc

This commit is contained in:
2021-11-08 21:32:30 +00:00
parent f019c47d21
commit cf1bc70103
17 changed files with 427 additions and 72 deletions

View File

@ -16,7 +16,12 @@ func main() {
}
bv := &bcrypt.Verifier{}
db := postgres.Connect(cfg.DatabaseHost, cfg.DatabaseUser, cfg.DatabasePassword, cfg.DatabaseName)
db, err := postgres.Connect(cfg.DatabaseHost, cfg.DatabaseUser, cfg.DatabasePassword, cfg.DatabaseName)
if err != nil {
panic("Failed connecting to DB")
}
id, err := ulid.NewGenerator()
if err != nil {
panic("Failed creating ID-Generator")