Don't require superuser permission to run database migrations
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.
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.
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.