Move the inclusion of the AWL tables out of the database SQL.

This commit is contained in:
Andrew McMillan 2007-11-05 22:56:33 +13:00
parent 0b4e5b9cb5
commit e12139c636
2 changed files with 7 additions and 6 deletions

View File

@ -42,7 +42,12 @@ fi
create_plpgsql_language
#
# FIXME: filter non-error output
# Load the AWL base tables and schema management tables
psql -q -f "/usr/share/awl/dba/awl-tables.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: )"
psql -q -f "/usr/share/awl/dba/schema-management.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: )"
#
# 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}"
@ -61,7 +66,7 @@ fi
if [ "$ADMINPW" = "" ] ; then
# OK. They didn't supply one, and pwgen didn't work, so we hack something
# together from /dev/random ...
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d "a-zA-HJ-NP-Y0-9" | cut -c2-9`"
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d "a-km-zA-HJ-NP-Y0-9" | cut -c2-9`"
fi
if [ "$ADMINPW" = "" ] ; then

View File

@ -1,10 +1,6 @@
-- Really Simple CalDAV Store - Database Schema
--
-- Use the usr, group and schema management stufffrom libawl-php
\i /usr/share/awl/dba/awl-tables.sql
\i /usr/share/awl/dba/schema-management.sql
-- The main event. Where we store the things the calendar throws at us.
CREATE TABLE caldav_data (
user_no INT references usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,