Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for extensions #52

Closed
KrzysztofZawisla opened this issue Dec 7, 2022 · 8 comments
Closed

Add support for extensions #52

KrzysztofZawisla opened this issue Dec 7, 2022 · 8 comments

Comments

@KrzysztofZawisla
Copy link

KrzysztofZawisla commented Dec 7, 2022

https://www.prisma.io/docs/concepts/components/prisma-schema/postgresql-extensions

With the current implementation, this code:

datasource: {
  // rest
  extensions: `[pg_tgrm, zombodb]`,
  // rest
}

Evaluates to:

extensions = "[pg_tgrm, zombodb]"
@ridafkih
Copy link
Owner

ridafkih commented Dec 8, 2022

@KrzysztofZawisla What if you provide an array of strings? Can add type support as well, but that should work in the meantime unless I'm horribly wrong.

@ridafkih
Copy link
Owner

ridafkih commented Dec 8, 2022

@KrzysztofZawisla Added to #53, if you'd like to test, otherwise I'll have this merged in tomorrow! :)

@ridafkih
Copy link
Owner

Has been merged and released in v1.8.4

@KrzysztofZawisla
Copy link
Author

@KrzysztofZawisla What if you provide an array of strings? Can add type support as well, but that should work in the meantime unless I'm horribly wrong.

Sorry, I was out of programming vibe for these 4 days, so I didn't even check replies on this issue. It's important to not have items in array as string, because they will also be evaluated to string in prisma schema. Prisma requires passing extensions not as string to properly highlight syntax. In free time I will check the new release if it solves that problem.

@ridafkih ridafkih reopened this Dec 12, 2022
@ridafkih
Copy link
Owner

@KrzysztofZawisla Thanks for letting me know! I'll make this adjustment tonight.

@ridafkih
Copy link
Owner

ridafkih commented Dec 12, 2022

@KrzysztofZawisla Alright, #54 should address this fair and square. I was actually looking at the project you're contributing to the other day that implemented Schemix, and was impressed by the scale at which you guys took the library. Was very happy to see that.

Since you guys are really using the library well, if you have any other suggestions, feature requests, or bug reports, let me know and I'll be sure to address them as soon as I can. Since you guys are using MongoDB, I'd love to pull some of the situations where you might have to create wrapper functions or use raw out and make sure they're integrated directly to improve the usability of the library.

Anywho, feel free to review #54, otherwise I'll have it merged in today or tomorrow.

@ridafkih
Copy link
Owner

Released in v1.8.5 since the change does not touch any other components, let me know if that addresses that and I will close this issue.

@KrzysztofZawisla
Copy link
Author

@ridafkih I have checked the new release (1.8.5) and everything works perfectly good.

I'm also happy about the fact that you have created that library, and we found it. Unique and well-done documented library in this field. Our Prisma schema expanded dramatically, and we thought that have to be separated + we had issues with stuff that must have done programmatically like country codes or enums generated based on typescript enums. We will make a PR or report issue in case when we will found a way to improvement something, but firstly we need to make our PostgreSQL, MongoDB, and FaunaDB schemas/structure and migrations 😅. 

Best Regards,
Krzysztof Zawisła and @borys-malinowski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants