I found it useful to have script that will drop all the tables and load in fresh ones:

reset_database.sh:

#!/bin/sh
echo "Dropping old tables"
mysql -u root -pabcd1234 oscar_mcmaster < /home/tomcat/drop_tables.sql
echo "Creating new tables"
mysql -u root -pabcd1234 oscar_mcmaster < /home/david/cvs/oscar_mcmaster/database/mysql/oscarinit.sql
mysql -u root -pabcd1234 oscar_mcmaster < /home/david/cvs/oscar_mcmaster/database/mysql/oscardata.sql
mysql -u root -pabcd1234 oscar_mcmaster < /home/david/cvs/oscar_mcmaster/database/mysql/demopatient.sql
mysql -u root -pabcd1234 oscar_mcmaster < /home/david/cvs/oscar_mcmaster/database/mysql/oscarinit_bc.sql
mysql -u root -pabcd1234 oscar_mcmaster < /home/david/cvs/oscar_mcmaster/database/mysql/oscardata_bc.sql

drop_tables.sql:

DROP TABLE `allergies`, `appointment`, `batchEligibility`, `billactivity`, `billcenter`, `billing`, `billingdetail`, `billinginr`, `billinglocation`, `billingmaster`, `billingnote`, `billingreferral`, `billingservice`, `billingstatus_types`, `billingtypes`, `billingvisit`, `billing_cdm_service_codes`, `billing_history`, `billing_msp_servicecode_times`, `billing_payment_type`, `billing_preferences`, `billing_private_transactions`, `billing_service_code_conditions`, `billing_trayfees`, `bill_recipients`, `clinic`, `clinic_location`, `config_Immunization`, `consultationRequests`, `consultationServices`, `ctl_billingservice`, `ctl_billingservice_age_rules`, `ctl_billingservice_premium`, `ctl_billingservice_sex_rules`, `ctl_diagcode`, `ctl_doctype`, `ctl_document`, `ctl_frequency`, `ctl_provider`, `ctl_servicecodes_dxcodes`, `ctl_specialinstructions`, `demographic`, `demographicaccessory`, `demographiccust`, `demographicExt`, `demographicPharmacy`, `demographicQueryFavourites`, `demographicSets`, `demographicstudy`, `desannualreviewplan`, `desaprisk`, `diagnosticcode`, `diseases`, `document`, `drugs`, `dxresearch`, `eChart`, `eform`, `eforms`, `eforms_data`, `eform_data`, `eform_groups`, `eform_values`, `encounter`, `encounterForm`, `encountertemplate`, `encounterWindow`, `favorites`, `FaxClientLog`, `fileUploadCheck`, `form`, `form2MinWalk`, `formAdf`, `formAdfV2`, `formAlpha`, `formAnnual`, `formAnnualV2`, `formAR`, `formBCAR`, `formBCBirthSumMo`, `formBCINR`, `formBCNewBorn`, `formCaregiver`, `formCESD`, `formCostQuestionnaire`, `formFalls`, `formGripStrength`, `formGrowth0_36`, `formHomeFalls`, `formImmunAllergy`, `formIntakeInfo`, `formInternetAccess`, `formLabReq`, `formLateLifeFDIDisability`, `formLateLifeFDIFunction`, `formMentalHealth`, `formMMSE`, `formPalliativeCare`, `formPeriMenopausal`, `formRourke`, `formSatisfactionScale`, `formSelfAdministered`, `formSelfEfficacy`, `formSelfManagement`, `formSF36`, `formSF36Caregiver`, `formTreatmentPref`, `formType2Diabetes`, `formVTForm`, `formWCB`, `groupMembers_tbl`, `groups_tbl`, `hl7_link`, `hl7_message`, `hl7_msh`, `hl7_obr`, `hl7_obx`, `hl7_orc`, `hl7_pid`, `ichppccode`, `immunizations`, `log`, `log_teleplantx`, `mdsMSH`, `mdsNTE`, `mdsOBR`, `mdsOBX`, `mdsPID`, `mdsPV1`, `mdsZCL`, `mdsZCT`, `mdsZFR`, `mdsZLB`, `mdsZMC`, `mdsZMN`, `mdsZRG`, `measurementCSSLocation`, `measurementGroup`, `measurementGroupStyle`, `measurements`, `measurementsDeleted`, `measurementType`, `measurementTypeDeleted`, `messagelisttbl`, `messagetbl`, `msgDemoMap`, `mygroup`, `oscarcommlocations`, `patientLabRouting`, `pharmacyInfo`, `preference`, `prescribe`, `prescription`, `preventions`, `preventionsExt`, `professionalSpecialists`, `property`, `provider`, `providerExt`, `providerLabRouting`, `quickList`, `quickListUser`, `radetail`, `raheader`, `recyclebin`, `recycle_bin`, `rehabStudy2004`, `relationships`, `remoteAttachments`, `reportagesex`, `reportByExamples`, `reportByExamplesFavorite`, `reportConfig`, `reportFilter`, `reportItem`, `reportprovider`, `reportTableFieldCaption`, `reporttemp`, `rschedule`, `scheduledate`, `scheduledaytemplate`, `scheduleholiday`, `scheduletemplate`, `scheduletemplatecode`, `secObjectName`, `secObjPrivilege`, `secPrivilege`, `secRole`, `security`, `secUserRole`, `serviceSpecialists`, `specialistsJavascript`, `specialty`, `study`, `studydata`, `studylogin`, `surveyData`, `table_modification`, `teleplanC12`, `teleplanS00`, `teleplanS21`, `teleplanS22`, `teleplanS23`, `teleplanS25`, `teleplan_adj_codes`, `teleplan_refusal_code`, `tickler`, `tmpdiagnosticcode`, `validations`, `waitingList`, `waitingListName`, `wcb`, `wcb_bp_code`, `wcb_noi_code`, `wcb_side`;

-- DavidGrant - 13 Sep 2006
Topic revision: 13 Sep 2006, DavidGrant
 
Download.png
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark