-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix #38749, postgresql GRANT user's permission after createDatabase, … #38750
Conversation
I’m not familiar enough with databases to review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your pull 👍
Could you please provide us some more information about your change?
I'm not familiar with PostgreSQL. Grant create does not work, before creating the database because the schema public does not exist?
I think we should remove the code to create database tables and users. |
Sorry, not familiar with PHP. This is the
After container up, enter the container got error: |
I traced this bug.
In my opinion, create users & database & tables are very good functions, because most users are newbies, they don't have the ability to manage the database. But this function should be refactor, for example server/lib/private/Setup/PostgreSQL.php Lines 122 to 143 in 63bf207
owner to nextcloud database user and copy all the permission nextcloud database user.
I can do this job, but still try to figure out how to write the TEST & execute it. |
I would prefer that newbies learn how to create a database and database user ;) We have automated tests for PostgreSQL. The notable difference:
That means in our automated tests, we do not run the code to create a database table. This code path is apparently broken.
The stack trace is a bit misleading. server/lib/private/Setup/PostgreSQL.php Line 65 in eb7b682
Here is the problem.
We need to overwrite the dbname (like for |
This bug still exists, wish someone could review it. |
Are you referring to the commit message? can you tell me more specifically? |
Yes the commit message, we try to follow the conventional commits spec: https://www.conventionalcommits.org/ Some examples:
|
…database exist when GRANT
add8bde
to
7856a7e
Compare
Rebased and reviewed! Thanks for the hard work @whlsxl 💪 |
7856a7e
to
67c52d2
Compare
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
…ensure database exist when GRANT