#!/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 --default-character-set=latin1 $DB < $2 echo } function executeWithTempFile() { echo ---------------------------------------- $1 mysql -u$USER -f -p$password --default-character-set=latin1 $DB < $2 > tmp.sql mysql -u$USER -f -p$password --default-character-set=latin1 $DB < tmp.sql rm tmp.sql echo } execute "Update Registration Agreement" updateRegistrationAgreement.sql execute "Update ojb concrete class for LEIC and LEEC StudentCurricularPlans" updateStudentCurricularPlans.sql execute "Add Year Month Day To Scientific Journal Participation" addYearMonthDayToScientificJournalParticipation.sql execute "Alter File Table" alterFileTable.sql execute "Modify Persistent Group Members" modifyPersistentGroupMembers.sql execute "Disable Presentation, Announcements and Events in Department and Research Site" makeSomeUnitSiteSectionsInvisible.sql execute "Add key to unit site as an introduction section" alterSection.sql execute "Add Mobility Program To Academic Service Request" addMobilityProgramToAcademicServiceRequestTable.sql