Skip to content

Commit e193812

Browse files
committed
Removed suggestion to grant personal user privs in migration.
Reworded to emphasise use of migration scripts.
1 parent f53cb95 commit e193812

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/persistence/postgres/explanations/grants-and-privileges.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ By default, the user is granted `SELECT` privileges on all tables and sequences
99

1010
With the `--all-privs` flag, the user is granted `ALL` privileges on all tables and sequences in the default schema.
1111
In addition, the user is granted `CREATE` on the default schema.
12+
This should be enough to allow most maintenance tasks, but if you need more privileges, you can usually grant yourself the necessary privileges.
1213

13-
This should be enough to allow most maintenance tasks, but if you need more privileges, you can usually grant yourself the needed privileges.
14-
If you find there are still some things you are unable to do, a common workaround is to make the changes via database-migration scripts (such as [Flyway](https://flywaydb.org/), [Liquibase](https://www.liquibase.org/), or [Alembic](https://alembic.sqlalchemy.org/)) that run as part of the application startup.
15-
Since these scripts are run by the application user, such scripts can also be used to grant additional privileges to personal users if needed.
14+
However, making changes to the database is best done through the application or through database migration scripts (such as [Flyway](https://flywaydb.org/), [Liquibase](https://www.liquibase.org/), or [Alembic](https://alembic.sqlalchemy.org/)) that run as part of the application startup.
1615

1716
Read more about PostgreSQL privileges in the official [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-grant.html).

0 commit comments

Comments
 (0)