ergo icon indicating copy to clipboard operation
ergo copied to clipboard

Support for Postgres database?

Open poVoq opened this issue 3 years ago • 3 comments

Would be nice to have as an alternative to MySQL/MariaDB for cases like my server that already runs a Postgres database and is a bit low on RAM. And there are also a lot of people who simply dislike MySQL ;)

Thanks for considering.

poVoq avatar May 21 '21 21:05 poVoq

This is totally reasonable. I think Hashbang would also be interested since they have a preexisting Postgres deployment.

Action items:

  1. The CREATE TABLE statements are probably not compatible out of the box with Postgres; we may need a way to switch between alternative forms of the statements
  2. We need to pull in a Postgres driver (probably jackc/pgx) and verify that it doesn't increase the binary size too much

slingamn avatar May 21 '21 21:05 slingamn

Is anyone working on this? (I'd like to add that sqlite support would also be appreciated)

hello-smile6 avatar Sep 26 '22 03:09 hello-smile6

https://github.com/ZCube/ergo/commit/0a6925cc049a5a92981752cec2284c23f5de8792

I tried using GORM. The History API was cloned from MySQL and implemented using GORM. I would be happy to use it as a reference.

Currently, I only worked on the API, so the server may not operate properly.

ZCube avatar Oct 21 '23 21:10 ZCube