Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't require SUPERUSER to run migrations #3002

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

CobaltCause
Copy link
Contributor

Fixes #2863.

The first commit fixes the problem, the second one prevents it from happening again.

The second commit is there to convey the idea but obviously it shouldn't be implemented this way since there's an existing docker-compose.yml in the repository. If you can point me to the relevant places this sort of change needs to actually happen, I'll amend that second commit.

Would probably also be wise to test this with more data, I used a completely different hack to work around this for my instance.

@Nutomic
Copy link
Member

Nutomic commented Jun 12, 2023

We normally use the system postgres, its unlikely that we would remember to test again for this rare problem with another postgres. I also dont want to pollute the repo root with more files.

Its better if you can apply this init step to the postgres used by ci, which is defined at the bottom of .woodpecker.yml.

@Nutomic Nutomic marked this pull request as ready for review June 12, 2023 21:50
@CobaltCause CobaltCause force-pushed the no-db-superuser branch 2 times, most recently from 77a7ae4 to 072e744 Compare June 12, 2023 22:01
@CobaltCause
Copy link
Contributor Author

Last force pushes were to rebase onto main and because I forgot to remove the old environment variables for docker/docker-compose.yml which are now controlled by docker/init-user-db.sh. I think this should be ready to go now.

.woodpecker.yml Outdated Show resolved Hide resolved
@Nutomic Nutomic merged commit f43bb45 into LemmyNet:main Jun 14, 2023
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't require superuser permission to run database migrations
3 participants