discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
384 stars 40 forks source link

Use of POSTGRESQL instead of MariaDB #101

Open taaaahahaha opened 3 weeks ago

taaaahahaha commented 3 weeks ago

I havent been using go as a backend service and was wondering which configuration files should be changed to switch the database from mariadb to postgres. I did import _ "github.com/lib/pq" inside cli.go, but ./discuit migrate is taking a lot of time (The database creds are working and discuit database is created)

Codycody31 commented 3 weeks ago

The Discuit codebase is built around MariaDB/MySQL, so it isn't meant to use PostgreSQL. for example:

https://github.com/discuitnet/discuit/blob/main/cli/migrate/migrate.go#L113-L134

has "mysql:// hardcoded, and while it may be possible it would require a large amount of altering in the codebase and migrations given they are for MySQL.

taaaahahaha commented 3 weeks ago

Yes, I know. I have updated the codebase to accept connections from postgres, however am running into issues when migrate is being ran.