#!/bin/sh # ----------------------------------------------------------------------------- # # Runs sql scripts to update database from previous release. # # ----------------------------------------------------------------------------- # DB=$1 USER=$2 password=$3 echo Running 'run_parte' Script R-ISCTE-2007-03-28; 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-2007-03-28/tmp.sql mysql -u$USER -f -p$password --default-character-set=latin1 $DB < ./R-ISCTE-2007-03-28/tmp.sql rm ./R-ISCTE-2007-03-28/tmp.sql echo } executeWithTempFile "./R2007-03-09/alterResult.sql" ./R2007-03-09/alterResult.sql executeWithTempFile "./R2007-03-09/addDegreeTypeToCourseGroup.sql" ./R2007-03-09/addDegreeTypeToCourseGroup.sql executeWithTempFile "./R2007-03-09/createUsernameCounterTable.sql" ./R2007-03-09/createUsernameCounterTable.sql executeWithTempFile "./R2007-03-09/alterResultTable.sql" ./R2007-03-09/alterResultTable.sql executeWithTempFile "./R2007-03-09/AlterThesisTable.sql" ./R2007-03-09/AlterThesisTable.sql executeWithTempFile "./R2007-03-12/fixProblemWithKeysInArticleAssociation.sql" ./R2007-03-12/fixProblemWithKeysInArticleAssociation.sql executeWithTempFile "./R2007-03-12/addSpecialIssueSupport.sql" ./R2007-03-12/addSpecialIssueSupport.sql executeWithTempFile "./R2007-03-13/createFunctionalityPrintersTable.sql" ./R2007-03-13/createFunctionalityPrintersTable.sql executeWithTempFile "./R2007-03-15/AddTypeToCompetenceCourse.sql" ./R2007-03-15/AddTypeToCompetenceCourse.sql executeWithTempFile "./R2007-03-15/AlterCoordinatorTable.sql" ./R2007-03-15/AlterCoordinatorTable.sql executeWithTempFile "./R2007-03-15/alterTableWorkScheduleType.sql" ./R2007-03-15/alterTableWorkScheduleType.sql executeWithTempFile "./R2007-03-16/addPersonToDepartmentCreditsManagement.sql" ./R2007-03-16/addPersonToDepartmentCreditsManagement.sql executeWithTempFile "./R2007-03-16/createThesisEvaluationParticipantTable.sql" ./R2007-03-16/createThesisEvaluationParticipantTable.sql executeWithTempFile "./R2007-03-16/addRejectionCommentThesisTable.sql" ./R2007-03-16/addRejectionCommentThesisTable.sql executeWithTempFile "./R2007-03-16/CreateRegistrationNumberTable.sql" ./R2007-03-16/CreateRegistrationNumberTable.sql executeWithTempFile "./R2007-03-16/addEventKeyToEnrolmentEvaluation.sql" ./R2007-03-16/addEventKeyToEnrolmentEvaluation.sql executeWithTempFile "./R2007-03-16/migrateResearchTypeLocalToNational.sql" ./R2007-03-16/migrateResearchTypeLocalToNational.sql executeWithTempFile "./R2007-03-16/alterTableExternalRegistrationData.sql" ./R2007-03-16/alterTableExternalRegistrationData.sql executeWithTempFile "./R2007-03-19/alterConvokesTable.sql" ./R2007-03-19/alterConvokesTable.sql executeWithTempFile "./R2007-03-19/alterVigilantGroupTable.sql" ./R2007-03-19/alterVigilantGroupTable.sql executeWithTempFile "./R2007-03-19/updateScopeType.sql" ./R2007-03-19/updateScopeType.sql executeWithTempFile "./R2007-03-22/createProtocolTables.sql" ./R2007-03-22/createProtocolTables.sql executeWithTempFile "./R2007-03-22/alterFileTable.sql" ./R2007-03-22/alterFileTable.sql executeWithTempFile "./R2007-03-26/fixScientificJournalsByRequest.sql" ./R2007-03-26/fixScientificJournalsByRequest.sql executeWithTempFile "./R2007-03-26/createResearchEventTable.sql" ./R2007-03-26/createResearchEventTable.sql executeWithTempFile "./R2007-03-26/createEventConferenceArticlesAssociationsTable.sql" ./R2007-03-26/createEventConferenceArticlesAssociationsTable.sql executeWithTempFile "./R2007-03-26/alterResearchResultTable.sql" ./R2007-03-26/alterResearchResultTable.sql executeWithTempFile "./R2007-03-26/alterResearchActivityTable.sql" ./R2007-03-26/alterResearchActivityTable.sql executeWithTempFile "./R2007-03-26/alterTableRoomOccupation.sql" ./R2007-03-26/alterTableRoomOccupation.sql