From: Eric Bollengier Date: Mon, 18 Oct 2021 18:53:33 +0000 (+0200) Subject: Use transation to create PostgreSQL schema X-Git-Tag: Beta-15.0.0~813 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81febb1c29e01f492175d8e3c68d0c461e6f7099;p=thirdparty%2Fbacula.git Use transation to create PostgreSQL schema --- diff --git a/bacula/src/cats/grant_postgresql_privileges.in b/bacula/src/cats/grant_postgresql_privileges.in index 4d6187fcd..b8c7fbd0c 100644 --- a/bacula/src/cats/grant_postgresql_privileges.in +++ b/bacula/src/cats/grant_postgresql_privileges.in @@ -21,6 +21,7 @@ create user ${db_user} ${pass}; -- for the database alter database ${db_name} owner to ${db_user} ; +grant CREATE on DATABASE ${db_name} to ${db_user}; -- for tables grant all on MetaEmail to ${db_user}; diff --git a/bacula/src/cats/make_postgresql_tables.in b/bacula/src/cats/make_postgresql_tables.in index 4481a5343..5be98e80e 100644 --- a/bacula/src/cats/make_postgresql_tables.in +++ b/bacula/src/cats/make_postgresql_tables.in @@ -15,6 +15,7 @@ db_name=${db_name:-@db_name@} psql -f - -d ${db_name} $* <