#!/bin/sh # ----------------------------------------------------------------------------- # # Runs sql scripts to update database from previous release. # # ----------------------------------------------------------------------------- # DB=$1 USER=$2 echo Using database: $DB echo Enter password for $USER: read -s password function execute() { echo ---------------------------------------- $1 mysql -u$USER -f -p$password $DB < $2 echo } execute "Alter Person table To Party table" alterPersonToPartyTable.sql execute "Create PARTY_PARTY Table" createTablePartyParty.sql execute "Create ACCOUNTABILITY Table" createAccountabilityTable.sql execute "Insert temporary KEY_OLD_UNIT columns" addKeyOldUnitColumns.sql execute "Change DEQ Name" changeDEQName.sql execute "Drop unnecessary keyInstitution columns" dropKeyInstitutionColumn.sql execute "Add new columns to CurricularRule table" alterCurricularRuleTable.sql