lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Don't require superuser permission to run database migrations

Open Nutomic opened this issue 2 years ago • 2 comments

Some admins reported problems installing Lemmy because the db migrations require superuser permissions. This is not available on some cloud hosting providers. So it would be nice if we could get rid of this requirement. Apparently the problem is caused by disable trigger all.

Nutomic avatar May 15 '23 08:05 Nutomic

git blame says https://github.com/LemmyNet/lemmy/pull/2670.

I figured out how to work around this in https://github.com/LemmyNet/lemmy/issues/2784#issuecomment-1578337686.

I didn't look at the feasibility of this but maybe some checks can be added around these queries to detect whether this is necessary and do so conditionally. I don't really know how bad the previous performance was, but maybe that PR could simply be reverted.

CobaltCause avatar Jun 07 '23 02:06 CobaltCause

Not really sure of a good solution to this one. We shouldn't revert that PR, as its a DB migration. We might possibly be able to just remove that trigger disable. People have mostly upgraded past that point anyway.

dessalines avatar Jun 07 '23 19:06 dessalines