upgraded migrations and context usage

This commit is contained in:
Fran Jurmanović
2021-07-03 00:01:25 +02:00
parent 4189a0d333
commit 788ff3a146
33 changed files with 321 additions and 251 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"context"
"os"
"wallet-api/pkg/migrate"
"wallet-api/pkg/utl/db"
@@ -12,7 +13,8 @@ func main() {
godotenv.Load()
dbUrl := os.Getenv("DATABASE_URL")
ctx := context.Background()
conn := db.CreateConnection(dbUrl)
migrate.Start(conn)
conn := db.CreateConnection(dbUrl, ctx)
migrate.Start(conn, "")
}