You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks a lot for this tutorial, we use it for running our backend test and it's really cool and helpful. However, we faced a problem that postgres don't apply extensions for the public schema.
a bit background
We use prisma as ORM which creates a schema for DB.
During models declaration for the ID fields prisma adjust field to dbgenerated("uuid_generate_v4()")
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
uuid_generate_v4() is a part of Postgres extension uuid-ossp that is installed in our database for the public schema.
In our createTestContext we dynamically generate schema before test and further uuid_generate_v4() couldn’t be found inside schema for the test. That causes backend tests to fail with uuid_generate_v4() not being found.
So far we don’t have a way to set search_path for to our_dynamic_schema,public to allow postgresql to search for functions also in the public schema.
Hi guys
thanks a lot for this tutorial, we use it for running our backend test and it's really cool and helpful. However, we faced a problem that
postgres
don't apply extensions for the public schema.a bit background
We use
prisma
as ORM which creates a schema for DB.During models declaration for the
ID
fields prisma adjust field todbgenerated("uuid_generate_v4()")
uuid_generate_v4()
is a part of Postgres extensionuuid-ossp
that is installed in our database for the public schema.In our
createTestContext
we dynamically generate schema beforetest
and furtheruuid_generate_v4()
couldn’t be found inside schema for the test. That causes backend tests to fail withuuid_generate_v4()
not being found.So far we don’t have a way to set search_path for to our_dynamic_schema,public to allow
postgresql
to search for functions also in the public schema.https://github.com/graphql-nexus/tutorial/blob/master/tests/__helpers.ts#L78
The way I fixed is next, but I am not sure if it's the best solution
The text was updated successfully, but these errors were encountered: