JIRA Tickets for OpenMRS Should Support PostgreSQL

Tags: #<Tag:0x00007f0f17445368> #<Tag:0x00007f0f17445228>

OPENMRS SHOULD SUPPORT POSTGRESQL - TRUNK-4881

|------TRUNK-4882, OpenMRS Platform shoulf support PostgreSQL, Following are the subtasks to be done ( Many other subtasks may be added along the way ) :

|
|---------  Add required support for initialization like setting drivers, database specific queries	in initilization filter for PostgreSQL.
|
|---------Add the required foreign key on delete constraints in liquibase changesets as    hibernate relies on db fot these constraints.
|
|-------- Add changeset for adding ‘fuzzystrmatch’ extension in PostgreSQL since this is required for soundex.
|
|--------Add liquibase changeset to update the sequences value after all the insertions being done through core data changesets. This is required since PostgreSQL sequences do not increment when insertion is done with value of Id provided as done in core data change sets.
|
|---------For backward compatibility of sequences after hibernate 5 for db relying on tables for sequences add property => hibernate.id.new_generator_mappings=false
|
|--------For certain HibernateDAO classes we need to properly map them to their respective sequences created via liquibase changesets.
|
|-------Add code check so that DisableTriggersChangeSet.java and EnableTriggersChangeSet.java does not access information_schema tables.
|
|-------Remove order_by clauses in getEncountersByVisitsAndPatientCount() in 	Hibernate Encounter DAO as this involve use of aggregate function over order_by clause.
|
|--------Hibernate session execution of queries is not proper in case of PostgreSQL so when session.get(xyz.class), there is no record in the db and hence an error is raised. Resolve this issue.
|               
|--------Correct the liquibase changesets so that they don’t make use of 0 / 1 for boolean values as PostgreSQL does not recognize this.

All this will be done before phase 2 evaluations. Till phase 1, proper initialization and a certain number of admin section functionalities will be ready for demo. Hopefully till phase 2 openmrs-core will be working atop PostgreSQL seamlessly

Any suggestions are welcomed :slightly_smiling_face:

CC. @dkayiwa @jwnasambu

Create the subtasks and give a detailed description of each, with examples, error messages, stack traces, etc.

@dkayiwa , @jwnasambu

This in itself appears to be a sub-task of TRUNK-4881. So I am not getting option of creating sub-task in more section. Should I convert this into an issue and then proceede ?

Shouldn’t you create the sub task from? https://issues.openmrs.org/browse/TRUNK-4881

Actually, in this phase I am going to make platform work over PostgreSQL and I saw that there was already a ticket TRUNK-4882 for just making platform work on PostgreSQL. TRUNK-4881 holds a broader scope of making all the modules work on PostgreSQL as well. So creating sub-tasks for TRUNK-4881, might mix up tickets for different modules and platform.

What I had in mind that there should be a separate tickets ( along with its sub-task ) for each module and same for openmrs-core as well.

We can additionally link these tickets to TRUNK-4881.

Hi @dkayiwa and @jwnasambu . Can you give a confirmation on this so that I can wrap up creating the necessary tickets at JIRA ?

I would go for this.