refactor(db): migrate from mysql -> postgres #30

Closed
opened 2025-07-28 14:31:32 +00:00 by chartgerink · 1 comment
Owner

I originally chose MySQL because it has the option to use Vitess at a later stage, for scaling purposes. However, MySQL does not support easy returns that are now becoming a code complexity thing (that is, upon creation of a output, we have to query what we just created).

I am considering migrating to postgres after all, to reduce code complexity and recognize that Vitess is most likely never going to be necessary. Our plan is to offer hosted installations anyway, so the scale at which Vitess would make sense is unlikely to be reached.

It is a bit annoying because I was trying to be mindful of the choice and now I overthought it and it bites me now 😊 As a reference, I might have realized this because both Mastodon and Lemmy use Postgres and they do so at a considerable scale as well.

I originally chose MySQL because it has the option to use Vitess at a later stage, for scaling purposes. However, MySQL does not support easy returns that are now becoming a code complexity thing (that is, upon creation of a output, we have to query what we just created). I am considering migrating to postgres after all, to reduce code complexity and recognize that Vitess is most likely never going to be necessary. Our plan is to offer hosted installations anyway, so the scale at which Vitess would make sense is unlikely to be reached. It is a bit annoying because I was trying to be mindful of the choice and now I overthought it and it bites me now 😊 As a reference, I might have realized this because both Mastodon and Lemmy use Postgres and they do so at a considerable scale as well.
Author
Owner

Closing this as the refactor seems less urgent than I thought when opening this. Clearing out mental overhead because this builds up with various issues :)

May reconsider later.

Closing this as the refactor seems less urgent than I thought when opening this. Clearing out mental overhead because this builds up with various issues :) May reconsider later.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
researchequals/api#30
No description provided.