#!/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 "Add new final degree work columns" alterTableFinalDegreeWork.sql execute "Generating updates for new final degree work keys" updateFinalDegreeWorkProposal.sql > res.sql execute "Update new final degree work keys" res.sql execute "Drop final degree work columns" dropColumnsFinalDegreeWork.sql execute "Alter TeacherServiceExemption Table" alterTeacherServiceExemptionTable.sql execute "Create ProjectParticipation Table" createProjectParticipationTable.sql