thomiceli / opengist

Self-hosted pastebin powered by Git, open-source alternative to Github Gist.
https://demo.opengist.io
GNU Affero General Public License v3.0
1.52k stars 75 forks source link

Feature Request: Postgres database driver #173

Open kasefuchs opened 6 months ago

kasefuchs commented 6 months ago

Hello,

It would be nice to add support for postgres database driver as an alernative for sqlite.

thomiceli commented 6 months ago

Hi, in what case would you use Postgres over Sqlite for Opengist ?

kasefuchs commented 6 months ago

In my server architecture, I prefer to centralize all data in one RDBMS such as Postgres. This makes it possible to store the data itself separately from the application, edit data quite easily through pgadmin and visualize it using grafana.

ahgraber commented 2 months ago

+1 for postgres support. I have a much more robust backup / restore solution through postgres than I do with filesystem snapshots / copies.

maltegrosse commented 2 months ago

Would be nice to have Postgres implemented. As I can see you are using gorm, so should be straight forward: https://gorm.io/docs/connecting_to_the_database.html

EDIT: seems PR #231 is already working on it

thomiceli commented 2 months ago

I will review the PR soon enough, i might add mysql aswell