Closed Jonatthu closed 1 year ago
Hi @Jonatthu , thanks for bringing it up. Extensions are not supported yet but it's only on the ZModel syntax level. Need to support the grammar and then pass it down to Prisma schema.
I understand this is blocking for you, and we should be able to add it in the next release (early next week). Will it work for you?
Do you mind share the exact Prisma snippet that declares the extensions? Just want to make sure it work seamlessly.
@ymc9 That's excellent news! I will be looking forward to it
@ymc9 Here the snippet
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextIndex", "fullTextSearch", "multiSchema", "postgresqlExtensions"]
}
datasource db {
provider = "postgresql"
url = env("SUPABASE_DATABASE_URL")
directUrl = env("SUPABASE_DATABASE_DIRECT_URL")
extensions = [pg_trgm, postgis(version: "3.3.2"), uuid_ossp(map: "uuid-ossp", schema: "extensions")]
schemas = ["auth", "public"]
}
Awesome. Thank you! Stay tuned to the release notes 😄.
Hi @Jonatthu , the latest 1.0.1 release supports extensions syntax now.
When i run generate the next error happens, it's important to notice that I need those extensions, Does ZenStack not support prisma extensions?
$ zenstack generate Validation errors: line 10: Could not resolve reference to ReferenceTarget named 'pg_trgm'. [pg_trgm] line 10: Could not resolve reference to FunctionDecl named 'postgis'. [postgis] line 10: Could not resolve reference to FunctionDecl named 'uuid_ossp'. [uuid_ossp]