As odoo 10 is using Postgres 9.6 upgrade Bahmni Postgres from 9.5 to 9.6
Merged the above PR's raised by as part of postgresql-9.6 upgrade
https://github.com/Bahmni/bahmni-playbooks/commit/cb8dfbddca1db86f9bfecc48bce1ec263f1e7d61
https://github.com/Bahmni/bahmni-package/commit/7c6656fb34f8b8cdc84ce2bbbfa2d871f122007d
https://github.com/Bahmni/OpenElis/commit/c0b2772053618ed26609665cb3c00e19ea94666e
Please note after updating PostgreSQL to 9.6 was getting below error in bahmni install command:
TASK [bahmni-lab : Run openelis liquibase migrations of implementation config]
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-lab/tasks/main.yml:102
fatal: [localhost]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 255, "stderr": "+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION_NAME=default\n++ OPENMRS_DB_USERNAME=openmrs-user\n++ OPENMRS_DB_PASSWORD=password\n++ OPENMRS_DB_SERVER=localhost\n++ OPENELIS_DB_USERNAME=clinlims\n++ OPENELIS_DB_PASSWORD=password\n++ OPENELIS_DB_SERVER=localhost\n++ MYSQL_ROOT_USER=root\n++ MYSQL_ROOT_PASSWORD=password\n++ REPORTS_DB_SERVER=localhost\n++ REPORTS_DB_PASSWORD=password\n++ REPORTS_DB_USERNAME=reports-user\n+ CHANGE_LOG_TABLE='-Dliquibase.databaseChangeLogTableName=databasechangelog -Dliquibase.databaseChangeLogLockTableName=databasechangeloglock'\n+ LIQUIBASE_JAR=/opt/bahmni-lab/migrations/liquibase/lib/liquibase-1.9.5.jar\n+ DRIVER=org.postgresql.Driver\n+ CHANGE_LOG_FILE=liquibase.xml\n++ ls /opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar\n+ CLASSPATH=/opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar\n+ '[' -f /var/www/bahmni_config/openelis/migrations/liquibase.xml ']'\n+ cd /var/www/bahmni_config/openelis/migrations\n+ java -Dliquibase.databaseChangeLogTableName=databasechangelog -Dliquibase.databaseChangeLogLockTableName=databasechangeloglock -jar /opt/bahmni-lab/migrations/liquibase/lib/liquibase-1.9.5.jar --classpath=/opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar --driver=org.postgresql.Driver --changeLogFile=liquibase.xml --defaultSchemaName=clinlims --url=jdbcostgresql://localhost:5432/clinlims --username=clinlims --password=password update\n", "stdout": "Migration Failed: Error executing SQL CREATE TABLE clinlims.databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))\n", "stdout_lines": ["Migration Failed: Error executing SQL CREATE TABLE clinlims.databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))"]}
So updated PostgreSQL JDBC driver in OpenElis repo to latest "postgresql-42.2.5.jar"
Installed bahmni using the 92-61 installer. It comes with psql (PostgreSQL) 9.6.12 installed and working as expected.
The below commit needs to be cherry-picked to master. But we are not doing this now as master still pointing to postgresql-9.2 version.
https://github.com/Bahmni/OpenElis/commit/c0b2772053618ed26609665cb3c00e19ea94666e
Moving this to backlog as it needs to be tested for bahmni 0.93