#!/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 "Creating RootDomainObject and Setting up relations" createRootDomainObjectAndRelations.sql execute "Creating ResearchEvents table" createResearchEventTable.sql execute "Adding Prevailing Scientific Area to Degree" addPrevailingScientificAreaToDegree.sql execute "Creating Project table and setting up relations" createTableProject.sql execute "Creating WebsiteSection and WebsiteItem tables" addMoreCmsTables.sql execute "Adding and Modifying Columns in CurricularRule Table" alterCurricularRuleTable.sql execute "Alter NON_AFFILIATED_TEACHER Table" alterNonAffiliatedTeacherTable.sql execute "Alter EXTERNAL_PERSON Table" alterExternalPersonTable.sql