Skip to content

Commit

Permalink
fix pg connection string
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jul 21, 2024
1 parent f389fa2 commit a397ddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func connectAndMigrate(opts *connectMigrateOpts) (*sql.DB, error) {
dbtype = "postgres"
default:
// default to sqlite
datasource = opts.SQliteConnection
datasource = fmt.Sprintf("%s?_timeout=5000&_journal=WAL&_cache=shared", opts.SQliteConnection)
dbtype = "sqlite3"
}

Expand All @@ -93,7 +93,7 @@ func connectAndMigrate(opts *connectMigrateOpts) (*sql.DB, error) {
return nil, nil
}

db, err := sql.Open(dbtype, fmt.Sprintf("%s?_timeout=5000&_journal=WAL&_cache=shared", datasource))
db, err := sql.Open(dbtype, datasource)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ services:
- PGPORT=5432
- PGDATABASE=postgres
- LOGLEVEL=debug
- CGO_ENABLED=0
- GO_FLAGS=-count=1
working_dir: /data
command: ["go", "test", "./...", "-cover"]
Expand Down

0 comments on commit a397ddb

Please sign in to comment.