Skip to content
Snippets Groups Projects
Commit 748c1a1d authored by Rafael De Lima Prado's avatar Rafael De Lima Prado
Browse files

database: Remove importing dblink.sql

parent de31d014
No related branches found
No related tags found
No related merge requests found
...@@ -19,21 +19,28 @@ ...@@ -19,21 +19,28 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
export DB_NAME=$1 DB_NAME=$1
DB_LINK_LOCATION=/usr/share/postgresql/8.4/contrib/dblink.sql
# checking parameters print_help() {
if [[ -z $DB_NAME ]]; then echo -e ""
echo "usage: $0 [database_name]" echo -e "usage: $0 database_name [-d]"
exit 1 echo -e ""
echo -e " Options:"
echo -e " -d Run datawarehouse scripts after creation of tables."
echo -e ""
}
if [[ $1 != "-"* && $# != "0" ]]; then
DB_NAME=$1
shift
else
print_help
exit 1
fi fi
# creating db # creating db
createdb $DB_NAME createdb $DB_NAME
# importing db_link functions
psql $DB_NAME -f $DB_LINK_LOCATION
# creating database tables and structure # creating database tables and structure
for file in $(ls -B create/); do for file in $(ls -B create/); do
psql $DB_NAME -f create/$file psql $DB_NAME -f create/$file
...@@ -56,3 +63,4 @@ done ...@@ -56,3 +63,4 @@ done
# installing crontab # installing crontab
./cron.sh ./cron.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment