Open pleblancq opened 1 year ago
Glad to hear that the migraton went smoothly! š
I am afraid that supporting another database is adding quite some overhead to the project. Sure, we could just document the required changes and hope for the best. But after all, it would not been being tested. And the database is actually the layer where things could become dicey, as there are all your data being stored.
Therefore, to support other databases officially, there should be a really strong need. What is your reason to not just stick with the mariadb?
Just providing different, perhaps db-name-independent environment variables would be another story. We could also introduce a variable for the engine. Though modifying the settings.py is kind of okay, if you know what you are doing. š
And slightly off the topic: I could never get OpenEats up and running. Do you still have a copy? If so, would you mind to send me some screenshots about its sites, as sample/inspiration? š
I prefer PostgreSQL for performance reasons and I already use it with a bunch of other projects.
Yeah, I still have it installed. You can take a look of the original author demo site
For the PostgreSQL issue, if you do pure SQL it should always work with django. With OpenEats, everything worked fine even if the original author only supported mysql/mariadb.
I can send you a recipe creation screenshot since you can see the others views in the demo site.
About the performance, I doubt that we will ever hit any bottleneck caused by the database. I am hosting over 700 recipes on a raspberry pi 3 and mariadb.
Well, we could add a dedicated docs site about how to switch the database to another one, with a chapter for postgres that is marked as experimental. That isn't something that I will spend time on. If you would like to help, then those information could be of interest for other future users.
Some quick thoughts about the docs:
requirements.txt
needs to be changed, to exclude the mysqlclient and to include the psycopg2 package.db
needs to pull a postgres-image, volumes needs to be corrected and the healthcheck needs to be reimplemented.base/settings.py
and the docker images, then we should add that.In any case, even the information you wrote down into this issue is a nice source for other people that want to use postgresql. Thanks for your effort!
Thanks for the link!
Hello, long time user of OpenEats, I migrated to OwnRecipes after changing my python version (3.9 to 3.11).
My setup is the following:
The migration was pretty easy actually since its baremetal, I didn't have to migrate my DB, I juste ran the migrations.
When I was using OpenEats, I modified the base/settings.py to have:
and removed everthing associated to mysql and removed the mysql python package and replaced it with psycopg2 package. Since django supports natively PostgreSQL, it works out-of-the-box.
Its just a suggestion since your project seems active and it give the chance to people to use another DB. And I won't have to apply my hack at each release.
By the way, thank you for your fork, it keeps my wife happy and works with new tech.