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

SQLite as backend #317

Open
prusnak opened this issue Aug 8, 2024 · 1 comment
Open

SQLite as backend #317

prusnak opened this issue Aug 8, 2024 · 1 comment

Comments

@prusnak
Copy link

prusnak commented Aug 8, 2024

It would be amazing if moksha supported SQLite as backend for smaller instances.

If this is out of scope, feel free to close.

@ngutech21
Copy link
Owner

Thanks for the suggestion. There is already a trait for abstracting the database: https://github.com/ngutech21/moksha/blob/master/moksha-mint/src/database/mod.rs that is based on sqlx (https://github.com/launchbadge/sqlx) Since sqlx supports sqlite I think we could add this as a second option. Most of the queries should be very similar and could be copied over to the sqlx implementation of the Database trait.

But what would be the motivation using sqlite instead of postgres. I am providing a docker-compose file and helm charts for running it in k8s. So this should be fairly simple to setup. The only usecase I can think of for not using postgres would be integrating moksha-mint somewhere, like in a lightning-node where you it would be difficult to add a standalone db.

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