commentoplusplus icon indicating copy to clipboard operation
commentoplusplus copied to clipboard

RFE: Consider using an ORM to support databases other than Postgres

Open jwatt opened this issue 4 years ago • 6 comments

Happy New Year! And thanks for getting Commento development moving again! 😄

Tying Commento to Postgres limits how many people can use it. In principle, an ORM like GORM could allow a far wider audience to use Commento by making other databases an option (MySQL and SQLite in particular).

I've no idea whether anyone might be interested in doing the work to implement this, but I thought I'd file this issue on the off-chance.

jwatt avatar Jan 02 '21 18:01 jwatt

Happy new year! 😄

I completely agree we should move to an ORM, this would definitely help increase where commento can run!

Currently, the only things holding this back from the original commento are:

  • Reliance on pgsql features like triggers
  • A folder full of migrations to help upgrade older versions of commento
  • Hardcoded SQL statements in the /api folder

I will think about how best to address all of these!

souramoo avatar Jan 02 '21 21:01 souramoo

Awesome, thank you for outlining the work and the willingness to look into the various pieces. I understand these are all significant pieces of work however, so no pressure!

jwatt avatar Jan 06 '21 18:01 jwatt

I too would love to help in some way to support mysql. All my other services use MySQL, they also support postgresql, all except one. And the chances of Ghost supporting postgresql are .... not likely, especially since it looks like they dropped support for it a few versions back.

0mni avatar Jul 11 '21 05:07 0mni

I would love to see this. SQLite support in particular would open up hosting options a lot; would be much simpler to host serverless, etc... I know this is only a small part of the work, but SQLite does support triggers.

dflock avatar Nov 18 '21 06:11 dflock

I guess step one would be to choose an ORM?

dflock avatar Nov 18 '21 07:11 dflock

Possibly, although it may make more sense to wait until there's someone willing to work on this, since they may have a strong opinion on which ORM they want to use. :-)

jwatt avatar Nov 28 '21 18:11 jwatt