elixir-cloud-aai / foca

Opinionated Flask microservice archetype for quick OpenAPI-based microservice development
Apache License 2.0
16 stars 12 forks source link

Postgres/mysql/sqllite #135

Closed rememberlenny closed 1 year ago

rememberlenny commented 2 years ago

Has anyone made efforts to port this to use postgres or mysql?

uniqueg commented 2 years ago

Thanks for your question. As we have developed this archetype mainly for a suite of microservices where MongoDB is a great match, we personally haven't, and it's currently not on our roadmap. Also I haven't heard of anyone who has used it with SQL databases.

However, it should be easy to just ignore the database setup and hook up the app to your SQL database manually. If you decide to try that out, you can also do that inside FOCA: Abstract the current database config a little so that users can choose between MongoDB, xSQL (or whatever databases that may be supported in the future), add a config model for the database of your choice, add a module to hook up Flask with your db, with some basic default config, and I guess that should be it. We'd be more than happy to accept a PR for this and maintain the functionality in the future.

rememberlenny commented 2 years ago

This is a wonderful response. Thank you!

uniqueg commented 1 year ago

I will close this issue, as support for xSQL is not on our roadmap and will not be worked on by the maintainers for the foreseeable future. We would still gladly accept a PR provided by the community.