Patientos Patientos Software Upgrade Technical Guide
Patientos Patientos Software Upgrade Technical Guide
Version 0.96
Revision History
Date 8/27/2009 Version 0.96 Description Initial Author Greg Caulton
Page 1 of 10
Contents
1. OVERVIEW.........................................................................................................................................................................3 2. SOFTWARE INSTALLATION..........................................................................................................................................4 3. APPENDIX ..........................................................................................................................................................................8
Page 2 of 10
The basic steps to upgrading PatientOS are divided into the backend system and front end client a) Backend System a. Upgrade the database schema. b. Import the new database content. c. Deploy the new software code (and libraries when applicable). d. Restart the PatientOS application server. b) Frontend Client a. Deploy the new software code (and libraries when applicable).
1.2 Definitions
Refers to the PatientOS software as a system. Programming language developed by Sun An Open Source (free) database server, an alternative Oracle, SQLServer, etc. The backend J2EE server which clients connect to. The rich (fat) client graphic user interface (GUI) with which the users interact.
Page 3 of 10
2.
Software Installation
2.1 Backup database
Shutdown JBOSS and BACKUP YOUR DATABASE a) SQL Backup pg_dump -i -h localhost -p 5432 -U qapos -F p -O -v -f "backup.sql" qapos
b) Binary Backup Follow PostgreSQL intructions specific to your filesystem to perform a binary backup.
Page 4 of 10
If your database is not named qapos replace with your database name (find/replace in this document).
2.2.2
Execute the comparison of your qapos database with the new version
Edit the generated upgrade.sql and validate the contents looks appropriate
remove any DROP SEQUENCE COMMANDS
2.2.3 Upgrade the database
If your super user is not named qapos replace with your super user login. If your database is not named qapos replace with your database name. psql -U qapos qapos < upgrade.sql
Page 5 of 10
Change the database name, username and password to match the database you are upgrading. cd ../02data edit target_db.xml
2.3.2
Windows: upgrade.bat > upgrade.log 2>&1 Linux: ./upgrade.sh > upgrade.log 2>&1
Check upgrade.log for any errors Note the above step should take 30 minutes to many hours depending on disk throughput
Page 6 of 10
cd 03server copy patientis.ejb3 <target appserver dir>/server/default/deploy copy patientos.war <target appserver dir>/server/default/deploy
Any new jar files also need to be copied into the destination server/default/lib directory. Restart the application server
2.5 2.5.1
Upgrade Client Replace existing client files with files in this directory
cd 04client copy *.jar <target client dir>/lib copy patientos.bat <target client dir>/bin copy patientos.sh <target client dir>/bin
Any new jar files also need to be copied into the destination client lib directory.
Page 7 of 10
3.
Appendix
3.1 3.1.1 Upgrade SQL Unable to alter table
If a view depends on a table you will not be able to change data types of a column. Drop the dependent view and retry the SQL. The next comparison will generate the upgrade.sql with the dropped views.
3.1.2 Unable to add not null column
If a table has values and a numeric not null column is being added, add the column manually, update the rows to have a 0 value and then make the column not null.
3.1.3
Any views left over e.g. CREATE VIEW commentlibrary can be ignored. Views are not part of the core functionality.
Page 8 of 10