-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: support sqlite #34
Comments
hi can i take this? |
Yeah sure. Please check out the link before adding. Try to keep both sqlite and postgres. Add a new env var db_type, keep sqlite default... And make sure migrations work properly for both. Thank you. |
the current migration script requires creating the pgcrypto extension, but i dont think sqlite has that are you looking to maintain only 1 migration script for both DB types? |
yeah, I think having only one migration script would be great. |
hmmm ok i need to dig deeper to see if this is possible |
we can remove pgcrypto and use crypto library. So the script can work for both. |
ok yeah that works, i'll implement the crypto library in this PR too |
There is another issue with trying to support both postgres and sqlite with the same script:
Ways that i tried to resolve this but does not work:
|
not sure if you might have seen a solution for this somewhere, but we might have to end up having separate scripts if you do want to support both database types |
Hey thank you for trying, if having a single script for migration doesn't seem possible, we can create different scripts then... |
opened a PR to resolve this issue #43 |
Sqlite support will make it faster and easier to setup. But don't replace postgres with sqlite. Some might want to add a external database. You can keep both like this.
https://github.com/create-go-app/fiber-go-template/blob/master/platform/database/open_db_connection.go
The text was updated successfully, but these errors were encountered: