My setup: ubuntu 14.04.1 64bit, java 1.7.0_71, postgresql 9.3.5, postgresql-9.3-1102.jdbc41.jar
First I created a db called "openmrs", deployed openmrs.war (version 1.10.1) and followed the wizard (create tables and demo data).
But I get an error during an insert into the db (see full message at the end).
Inserts in liquibase-update-to-latest.xml into table 'order_type' refer to column 'retired' as type valueNumeric instead of valueBoolean (column is of type boolean):
<changeSet
id="201403070132-TRUNK-4286" author="andras-szell">
<preConditions
onFail="MARK_RAN">
<sqlCheck
expectedResult="0">select count(*) from order_type where
java_class_name = 'org.openmrs.TestOrder'</sqlCheck>
</preConditions>
<comment>Insert
order type for test orders</comment>
<insert
tableName="order_type">
<column
name="name" value="Test Order" />
<column
name="description" value="Order type for test orders" />
<column
name="java_class_name" value="org.openmrs.TestOrder" />
<column
name="creator" valueNumeric="1" />
<column
name="date_created" valueDate="2014-03-09" />
<column
name="retired" valueNumeric="0"
/>
<column
name="uuid" value="52a447d3-a64a-11e3-9aeb-50e549534c5e"
/>
</insert>
</changeSet>
Postgresql doesnt simply convert that to a boolean.
I guess I will encounter more of this as I go and will have to adapt resource files, ...
My question is are there people out there running OpenMRS with postgresql? In production?
And how much effort is it do do so? Is it easy (few changes to resource files) to get to run openmrs-core with postgresql.
And what is your experience with modules? Is it more of a challenge there.
Does anybody know if OpenMRS plans on supporting postgresql aside with mysql in the near future?
Thank you very much for your help!
Cheers
Ivo
Full error message shown by openmrs wizard:
There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml.
Error: Migration failed for change set liquibase-update-to-latest.xml::201403070132-TRUNK-4286::andras-szell: Reason: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO order_type (creator, date_created, description, java_class_name, name, retired, uuid) VALUES (1, '2014-03-09', 'Order type for test orders', 'org.openmrs.TestOrder', 'Test Order', 0, '52a447d3-a64a-11e3-9aeb-50e549534c5e'): ERROR: column "retired" is of type boolean but expression is of type integer Hint: You will need to rewrite or cast the expression. Position: 193: Caused By: Error executing SQL INSERT INTO order_type (creator, date_created, description, java_class_name, name, retired, uuid) VALUES (1, '2014-03-09', 'Order type for test orders', 'org.openmrs.TestOrder', 'Test Order', 0, '52a447d3-a64a-11e3-9aeb-50e549534c5e'): ERROR: column "retired" is of type boolean but expression is of type integer Hint: You will need to rewrite or cast the expression. Position: 193: Caused By: ERROR: column "retired" is of type boolean but expression is of type integer Hint: You will need to rewrite or cast the expression. Position: 193 Error while trying to update to the latest database version