Skip to content

Commit

Permalink
Explicitly use PUBLIC schema
Browse files Browse the repository at this point in the history
Also include that schema in all tests (otherwise they fail).  But it _does_ assume users will
install with that schema visible.
  • Loading branch information
arielshaqed committed Nov 9, 2020
1 parent da896de commit cccb491
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ddl/000011_parade.up.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN;

CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public;
CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public CASCADE;

CREATE TYPE task_status_code_value AS ENUM (
'pending', -- waiting for an actor to perform it (new or being retried)
Expand Down
2 changes: 1 addition & 1 deletion testutil/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func GetDB(t testing.TB, uri string, opts ...GetDBOption) (db.Database, string)
strings.ReplaceAll(uuid.New().String(), "-", ""))

// create connection
connURI := fmt.Sprintf("%s&search_path=%s", uri, generatedSchema)
connURI := fmt.Sprintf("%s&search_path=%s,public", uri, generatedSchema)
pool, err := pgxpool.Connect(ctx, connURI)
if err != nil {
t.Fatalf("could not connect to PostgreSQL: %s", err)
Expand Down

0 comments on commit cccb491

Please sign in to comment.