Skip to content

Commit fcdca04

Browse files
author
Guewen Baconnier
committed
Make the database user own the created database
1 parent 928d768 commit fcdca04

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

9.0/bin/migrate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
if ! PGPASSWORD=$DB_PASSWORD psql -lqtA -h db -U $DB_USER | grep -q "^$DB_NAME|"; then
5-
PGPASSWORD=$DB_PASSWORD createdb -h db -U $DB_USER $DB_NAME
5+
PGPASSWORD=$DB_PASSWORD createdb -h db -U $DB_USER -O $DB_USER $DB_NAME
66
fi
77

88
BASEDIR=$(dirname $0)

9.0/bin/runtests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi
2626

2727
DB_NAME_TEST=${DB_NAME}_test
2828

29-
PGPASSWORD=$DB_PASSWORD createdb -h db -U $DB_USER ${DB_NAME_TEST}
29+
PGPASSWORD=$DB_PASSWORD createdb -h db -U $DB_USER -O $DB_USER ${DB_NAME_TEST}
3030
${ODOO_DIR}/odoo.py --stop-after-init --workers=0 --database $DB_NAME_TEST --log-level=warn -i ${LOCAL_ADDONS}
3131
${ODOO_DIR}/odoo.py --stop-after-init --workers=0 --database $DB_NAME_TEST --test-enable -u ${LOCAL_ADDONS}
3232
PGPASSWORD=$DB_PASSWORD dropdb -h db -U $DB_USER ${DB_NAME_TEST}

HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Unreleased
2727

2828
**Bugfixes**
2929

30+
* Make the database user own the created database
31+
3032
**Libraries**
3133

3234
* Upgrade requests to 2.6.0 (same version defined in odoo's requirements.txt)

0 commit comments

Comments
 (0)