Multi db
Have you followed these guidelines?
- [ ] I have tested my changes
- [ ] There are no breaking changes
- [ ] I have thoroughly tested my changes and verified there are no regressions
- [x] My commit messages follow the Conventional Commits specification
- [x] I have read and understood the contribution guidelines
Hello :)
This is my first contribution and while i read the guidelines there I'm creating this draft PR just to get a better idea on what you consider minimalist here.
This is an initial effort to support multiple databases and for now cockroachdb support is added just so we can come to a consensus on what is the right approach here.
The final goal here is to close the popular #1925 (sqlite support) issue.
I also added a flake and helix configuration because that's what i use for development. I saw you use devcontainers but I am not at all familiar with them.
Please take note that I have not tested this specific code at all. What I have tested, however, is the cockroachdb patchset. Since creating that, I made some adjustments here to support multiple databases and then ported over that patchset so it doesn't interfere with the existing code (hopefully).
This has also been discussed in #42 #330 #2299 #3050 #3051 and likely others.
Speaking as a longtime user and fellow new contributor: I don't want this feature. Or any other variation.
Miniflux's opinionated commitment to Postgres is a strength, keeping complexity and dependencies down. Support for multiple databases will only lead to incompatibilities and further maintenance burden. The migrations changes alone terrify me.
Feature parity between databases is also just not there, especially for SQLite. Miniflux already depends on several Postgres-specific features. These would either have to be replicated and abstracted, moved to Go, or entirely scrapped.
https://github.com/miniflux/v2/issues/2299#issuecomment-1892625884
apparently maintainer is not fully against this as they wouldnt keep #1925 open and link it
the differences between postgres and cockroachdb are minimal - only one function for full-text search is missing in cockroachdb that miniflux uses
the stuff miniflux uses that is postgres-specific is minimal and mostly related to full-text search which can be implemented with a plain title search in sqlite
as far as dependencies go im new to go but as far as i know its one extra driver - if thats too much to ask fine ill close and keep maintaining a fork that only supports cockroachdb
and yes this adds complexity but this is the number one most reacted to issue on this repository
I'm not @fguillot so I won't pretend to make decisions for the project. Just linking what was previously said.
the differences between postgres and cockroachdb are minimal - only one function for full-text search is missing in cockroachdb that miniflux uses
the stuff miniflux uses that is postgres-specific is minimal and mostly related to full-text search which can be implemented with a plain title search in sqlite
FWIW I've been working on some changes to FTS and tagging that would increase incompatibility. This is exactly the kind of problems that I'm talking about though, now we have to consider compatibility for any feature that touches the schema or uses a complex query. Which is going to be most of them.
as far as dependencies go im new to go but as far as i know its one extra driver - if thats too much to ask fine ill close and keep maintaining a fork that only supports cockroachdb
I don't see a change to go.mod? I don't think this is a big issue for CockroachDB (which I thought was PG compatible?) but modernc.org/sqlite is a few million lines of machine translated C code.
This is exactly the kind of problems that I'm talking about though, now we have to consider compatibility for any feature that touches the schema or uses a complex query. Which is going to be most of them.
what if you don't and ping me to port it to sqlite/cockroachdb?
there really isn't that much thats postgres-specific - most stuff in this repo is basic CRUD SQL
which I thought was PG compatible?
correct - no extra deps needed
but modernc.org/sqlite is a few million lines of machine translated C code
im sorry but not sure i follow why this is a problem
sqlite is a very well established project
is the binary size a problem?
this is why i wanted to hear from the maintainer on what they mean by minimalism because it felt odd to me that they would keep that issue open for so long and not want this