Ensure database creation applies the right permissions.

This commit is contained in:
Andrew McMillan 2008-01-25 08:01:15 +13:00
parent 7120632632
commit 7226068a04

View File

@ -68,8 +68,18 @@ psql -q -f "${AWLDIR}/dba/schema-management.sql" "${DBNAME}" 2>&1 | egrep -v "(^
# Load the DAViCal tables
psql -q -f "${DBADIR}/davical.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: )"
psql -q -f "${DBADIR}/caldav_functions.sql" "${DBNAME}"
# psql -q -f "${DBADIR}/caldav_functions.sql" "${DBNAME}"
#
# The supported locales are in a separate file to make them easier to upgrade
#psql -q -f "${DBADIR}/supported_locales.sql" "${DBNAME}"
#
# Set permissions for the application DB user on the database
${DBADIR}/update-rscds-database --dbname "${DBNAME}" --appuser "${AWL_APPUSER}" --nopatch --revoke "general"
#
# Load the required base data
psql -q -f "${DBADIR}/base-data.sql" "${DBNAME}"
#
@ -96,7 +106,3 @@ fi
psql -q -c "UPDATE usr SET password = '**${ADMINPW}' WHERE user_no = 1;" "${DBNAME}"
echo "The password for the 'admin' user has been set to '${ADMINPW}'"
#
# The supported locales are in a separate file to make them easier to upgrade
psql -q -f "${DBADIR}/supported_locales.sql" "${DBNAME}"