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

Does not work for PostgreSQL v15 #24

Closed
zdravstvuy1714 opened this issue Feb 4, 2023 · 6 comments
Closed

Does not work for PostgreSQL v15 #24

zdravstvuy1714 opened this issue Feb 4, 2023 · 6 comments

Comments

@zdravstvuy1714
Copy link

zdravstvuy1714 commented Feb 4, 2023

.env
image

database config
image

validation rule
image

result
image

In the end, I settled on using version 3.5.0. It would be nice to have this fixed for 4 ver.

@ivanvermeyen
Copy link
Contributor

Hi,

Thanks for reporting this.
The cause of this issue is probably the same as #23.

I never used other databases than MySQL and SQLite, so I'm not exactly experienced with PostgreSQL.
I do know that even SQLite doesn't support the JSON syntax.
Maybe this is also the case for PostgreSQL?

I would be happy to improve compatibility, but I'll need some help with that.

@ivanvermeyen
Copy link
Contributor

Can you see if it works with 4.1.0?
Changed back to a LIKE query instead of JSON syntax.
https://github.com/codezero-be/laravel-unique-translation/releases/tag/4.1.0

@zdravstvuy1714
Copy link
Author

Yes, the bug has been fixed in version 4.1.0 of the package for PostgreSQL 15. Thank you!

@zdravstvuy1714
Copy link
Author

It is possible to make a slight improvement, depending on the database (MySQL or PostgreSQL) to use LIKE when using MySQL, and ILIKE when using PostgreSQL at findTranslation method:
image

@ivanvermeyen ivanvermeyen reopened this Feb 4, 2023
@ivanvermeyen
Copy link
Contributor

Thanks, I will add this 👍

@ivanvermeyen
Copy link
Contributor

Tagged in 4.1.2 🚀

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