seitime-frappe/frappe/database
hhharsha36 445da4319b
fix: error - permission denied for schema public from Postgres >= 15 during initial DB setup (#23799)
Error from Postgres:
ERROR:  permission denied for schema public at character 14

Error from Frappe:
psql:/home/frappe/frappe-bench/apps/frappe/frappe/database/postgres/framework_postgres.sql:72: ERROR:  permission denied for schema public

Error Causer:
Starting Postgres version >= 15, all users will have the `CREATE` permission revoked by default.

Fix:
Grant relevant privileges to the database in question for the user. In this case, DB owner privilege.

Note: the below two permission attempts were unsuccessful and still caused the same public schema permission error

GRANT USAGE, CREATE ON SCHEMA public TO {frappe.conf.db_name};
GRANT ALL ON SCHEMA public TO {frappe.conf.db_name}

References:
https://stackoverflow.com/questions/74110708/postgres-15-permission-denied-for-schema-public
https://stackoverflow.com/questions/67276391/why-am-i-getting-a-permission-denied-error-for-schema-public-on-pgadmin-4
2023-12-27 16:04:21 +05:30
..
mariadb Do not call begin in updatedb after syncing (#23934) 2023-12-26 12:12:19 +05:30
postgres fix: error - permission denied for schema public from Postgres >= 15 during initial DB setup (#23799) 2023-12-27 16:04:21 +05:30
__init__.py Merge pull request #23168 from blaggacao/refactor/centralize-python-shell-interface-for-database-binaries 2023-11-17 17:02:41 +05:30
database.py docs: consistent doc strings 2023-12-18 18:27:39 +05:30
db_manager.py chore: don't pipe output through pv 2023-12-26 11:09:08 +05:30
operator_map.py docs: consistency 2023-12-20 14:02:32 +05:30
query.py docs: consistent doc strings 2023-12-18 18:27:39 +05:30
schema.py refactor(treewide): code cleanup 2023-11-23 13:57:51 +05:30
sequence.py refactor!: remove implicit primary key from logs (#22209) 2023-08-26 16:01:47 +05:30
utils.py feat: migrate columns to be non-nullable if required 2023-11-16 14:51:57 +05:30