升級Database version script.

使用方式:

  1. 修正你的Database 資訊
  2. 切換至你要升級的script 資料夾,執行這個script
#!/bin/bash
### BEGIN INIT INFO
# Provides:          Ninniku Consulting
# Email:             ray@ninniku.tw
# Description:     1. change db user password information.
#                  2. Switch folder to what you want to import, then excute it
# 
### END INIT INFO

ADEMPIERE_DB_USER=adempiere
ADEMPIERE_DB_PASSWORD=adempiere
ADEMPIERE_DB_SERVER=localhost
ADEMPIERE_DB_PORT=5432
ADEMPIERE_DB_NAME=idempiere
PGPASSWORD=$ADEMPIERE_DB_PASSWORD
export PGPASSWORD


echo 'argc=' $#
for filename in ./*.sql; do
	echo $filename

psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $ADEMPIERE_DB_USER -f $filename

done

PGPASSWORD=
export PGPASSWORD

By Ray Lee (System Analyst)

iDempeire ERP Contributor, 經濟部中小企業處財務管理顧問 李寶瑞

Leave a Reply

Your email address will not be published. Required fields are marked *