#!/bin/sh # ----------------------------------------------------------------------------- # # Runs sql scripts to update database from previous release. # # ----------------------------------------------------------------------------- # echo Using database: $1 echo Enter password for $2: read -s password echo Altering table degree module mysql -u$2 -f -p$password $1 < alterTableDegreeModule.sql echo done. echo Creating Group Tables mysql -u$2 -f -p$password $1 < createDepartmentGoups.sql echo done. echo Change Mark Table... mysql -u$2 -f -p$password $1 < changeMarkTable.sql echo done. echo Update Mark Class Name... mysql -u$2 -f -p$password $1 < updateMarkClassName.sql > res.sql mysql -u$2 -f -p$password $1 < res.sql echo done. echo Update Final Mark Class Name... mysql -u$2 -f -p$password $1 < updateFinalMarkClassName.sql > res.sql mysql -u$2 -f -p$password $1 < res.sql echo done. echo Add Grade Scale Column... mysql -u$2 -f -p$password $1 < addGradeScaleColumn.sql > res.sql mysql -u$2 -f -p$password $1 < res.sql echo done.