Can I use taskcafe with MySQL? #167
Replies: 2 comments
-
However, by quickly browsing across the code, it seems that such a change would be impossible. The code requires something that only PostgreSQL has — 'extensions'. These are used for organising tables into some degree of modularity; the little I understand of PostgreSQL makes me believe that they're little more than 'syntactic sugar', i.e. not really contributing to major changes, but rather as a practical way to keep things organised (and somehow isolated from each other). I also guess (but it's just a guess!) that these extensions make partial database migration easier. There might also be some specific SQL instructions scattered around the code which use PostgreSQL's unique dialect. These would require a much deeper code change — since, in some cases, they might combine several SQL functions in a single line, and those would have to be expanded for MySQL. But you're totally right: 'forcing' PostgreSQL — and only PostgreSQL — to be the 'only' supported RDBMS is a showstopper for me as well. Having 'only' MySQL as a database in a server is not a 'problem'. It's more often than not a conscious decision, weighting in several issues — such as performance, stability, portability, general availability, and so forth. PostgreSQL has some advantages over MySQL here and there, but MySQL (especially recent versions of MySQL, of course) has other advantages. At the end of the day, that's the reason why I personally always recommend using standard SQL queries — as opposed to relying upon specific dialects — and have a general-purpose database layer (such as, say, GORM — but there are plenty to choose from), which can then be connected to whatever database is available on the system (via config files, as suggested). Unfortunately, this doesn't seem to be the case with Taskcafé. |
Beta Was this translation helpful? Give feedback.
-
@JordanKnott wrote backend code in Go and used PostgreSQL and the sqlc driver. Those are excellent choices for developing Taskcafe as a standalone application! "SQLC offers a unique combination of type safety, precision, and efficiency, making it an attractive choice for developers who value control and flexibility in their database interactions." SQLC supports PostgreSQL, MySQL, and SQLite. Most of the queries would work with all three DBs. Custom queries can be written to leverage specific features of a DB. SQLC can convert them to Go code. Integrating Taskcafe with an existing monolith application that uses MySQL wouldn't be too hard to solve. The backend is well-written. The existing PostgreSQL queries and code could be refactored for MySQL. I would stick with SQLC over ORM. I've used MySQL (also MariaDB) and PostgreSQL since the early 90s. Most projects I've been involved in are built from scratch. We have the flexibility to choose PostgreSQL because it's extremely extensible and can use various data types (GIS, NoSQL, graph, vector store for LLMs, etc) simultaneously. Unfortunately, when you rely on multiple apps and they use different DBs, integrating them to work with each other like sharing users, registration, etc. can be challenging. |
Beta Was this translation helpful? Give feedback.
-
Hello There,
This project is awsome and I want to use it. But the problem is that my existing database is MySQL and taskcafe supports "postgres".
My Question is, how I can use it with MySQL? Can you provide me a sample config file?
Beta Was this translation helpful? Give feedback.
All reactions