Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleWork in Progress

This page is a work in progress. This info box will be removed once complete.

Postgres is configured by importing the configuration file persistencefile persistence_postgres.xml in the OpenSRP spring configuration.

The file enables component scan for OpenSRP base package "org.opensrp" while excluding the CouchDb specific beans. This means that the CouchDb beans are not loaded in the spring container and are not candidate for dependency injection leaving only Postgres beans as the active beans.

Note: The form submission model was and atom feed databases were not migrated to be able to use Postgres.  Anyone using form submission model or atom feed and wants to store the data on Postgres  must first implement the Postgres repository beans before migrating to Postgres.to be able to store formsubmission and or atomfeed data on Postgres. However its possible to run both Postgres and CouchDb together in a configuration where Postgres store the data for the main OpenSRP database and error trace trace on CouchDb while the other databases still use CouchDb.

Motech scheduling library should still store its data on couchdb. For this its not possible to remove couchdb entirely until the scheduling library is changed to a library that can support Postgres e.g Quartz scheduling library

Technologies used

  • Mybatis library is used as the persistence framework.
  • Spring container managed transactions are used for transaction management
  • Tomcat JDBC pool is used as the pooled datasource

...