diff --git a/context.go b/context.go index 48b38da..34cdeaf 100644 --- a/context.go +++ b/context.go @@ -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" } @@ -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 } diff --git a/docker-compose.yml b/docker-compose.yml index c2c7ce6..db974c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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"]