#!/bin/sh # ----------------------------------------------------------------------------- # # Runs sql scripts to update database from previous release. # # ----------------------------------------------------------------------------- # DB=$1 USER=$2 password=$3 echo Running 'run' Script R-ISCTE-2006-10-26; function execute() { echo ---------------------------------------- $1 mysql -u$USER -f -p$password --default-character-set=latin1 $DB < $2 echo } function executeWithTempFile() { echo ---------------------------------------- $1 mysql -u$USER -f -p$password --default-character-set=latin1 $DB < $2 > ./R-ISCTE-2006-10-26/tmp.sql mysql -u$USER -f -p$password --default-character-set=latin1 $DB < ./R-ISCTE-2006-10-26/tmp.sql rm ./R-ISCTE-2006-10-26/tmp.sql echo } execute "Create LEGAL_REGIMEN_TYPE table" ./R-ISCTE-2006-10-26/CreateLegalRegimenTypeTable.sql execute "Change TEACHER_LEGAL_REGIMEN table" ./R-ISCTE-2006-10-26/ChangeTeacherLegalRegimenTable.sql