There are lots of errors in the PostgreSQL log however. Could this be related to my previous attempt to enable the audit log? Postgresql: "cannot execute nextval() in a read-only transaction" - #4 by prcleary
2019-11-13 19:27:11.120 UTC [5088] dhis@dhis2 ERROR: column "groupby" of relation "trackedentityattribute" does not exist
2019-11-13 19:27:11.120 UTC [5088] dhis@dhis2 STATEMENT: ALTER TABLE trackedentityattribute DROP COLUMN groupBy
2019-11-13 19:27:11.128 UTC [5089] dhis@dhis2 ERROR: column "aggregationype" of relation "trackedentityattribute" does not exist at character 35
2019-11-13 19:27:11.128 UTC [5089] dhis@dhis2 STATEMENT: update trackedentityattribute set aggregationype='AVERAGE' where aggregationtype is null
2019-11-13 19:27:11.136 UTC [5090] dhis@dhis2 ERROR: column "searchscope" of relation "trackedentityattribute" does not exist
2019-11-13 19:27:11.136 UTC [5090] dhis@dhis2 STATEMENT: ALTER TABLE trackedentityattribute DROP COLUMN searchscope
2019-11-13 19:27:11.144 UTC [5091] dhis@dhis2 ERROR: table "orgunitgroupprograms" does not exist
2019-11-13 19:27:11.144 UTC [5091] dhis@dhis2 STATEMENT: DROP TABLE orgunitgroupprograms
2019-11-13 19:27:11.152 UTC [5092] dhis@dhis2 ERROR: column "completed" of relation "programstageinstance" does not exist
2019-11-13 19:27:11.152 UTC [5092] dhis@dhis2 STATEMENT: ALTER TABLE programstageinstance DROP COLUMN completed
2019-11-13 19:27:11.170 UTC [5094] dhis@dhis2 ERROR: column "searchscope" of relation "program_attributes" does not exist
2019-11-13 19:27:11.170 UTC [5094] dhis@dhis2 STATEMENT: ALTER TABLE program_attributes DROP COLUMN searchscope
2019-11-13 19:27:11.212 UTC [5099] dhis@dhis2 ERROR: relation "programstage_dataelements" does not exist at character 8
2019-11-13 19:27:11.212 UTC [5099] dhis@dhis2 STATEMENT: update programstage_dataelements set allowfuturedate = allowdateinfuture where allowfuturedate is null
2019-11-13 19:27:11.219 UTC [5100] dhis@dhis2 ERROR: relation "programstage_dataelements" does not exist at character 8
2019-11-13 19:27:11.219 UTC [5100] dhis@dhis2 STATEMENT: update programstage_dataelements set allowfuturedate = false where allowfuturedate is null
2019-11-13 19:27:11.225 UTC [5101] dhis@dhis2 ERROR: relation "programstage_dataelements" does not exist
2019-11-13 19:27:11.225 UTC [5101] dhis@dhis2 STATEMENT: ALTER TABLE programstage_dataelements DROP COLUMN allowdateinfuture
2019-11-13 19:27:11.234 UTC [5102] dhis@dhis2 ERROR: column "allowdateinfuture" does not exist at character 49
2019-11-13 19:27:11.234 UTC [5102] dhis@dhis2 STATEMENT: update program_attributes set allowfuturedate = allowdateinfuture where allowfuturedate is null
2019-11-13 19:27:11.251 UTC [5104] dhis@dhis2 ERROR: column "allowdateinfuture" of relation "program_attributes" does not exist
2019-11-13 19:27:11.251 UTC [5104] dhis@dhis2 STATEMENT: ALTER TABLE program_attributes DROP COLUMN allowdateinfuture
2019-11-13 19:27:11.268 UTC [5106] dhis@dhis2 ERROR: sequence "period_periodid_seq" does not exist
2019-11-13 19:27:11.268 UTC [5106] dhis@dhis2 STATEMENT: DROP SEQUENCE period_periodid_seq
2019-11-13 19:27:11.276 UTC [5107] dhis@dhis2 ERROR: constraint "programstagesection_name_key" of relation "programstagesection" does not exist
2019-11-13 19:27:11.276 UTC [5107] dhis@dhis2 STATEMENT: ALTER TABLE programstagesection DROP CONSTRAINT programstagesection_name_key
2019-11-13 19:27:11.319 UTC [5113] dhis@dhis2 ERROR: column "valuetype" of relation "programindicator" does not exist
2019-11-13 19:27:11.319 UTC [5113] dhis@dhis2 STATEMENT: alter table programindicator drop column valuetype
2019-11-13 19:27:11.323 UTC [5114] dhis@dhis2 ERROR: column "rootdate" of relation "programindicator" does not exist
2019-11-13 19:27:11.323 UTC [5114] dhis@dhis2 STATEMENT: alter table programindicator drop column rootdate
2019-11-13 19:27:11.327 UTC [5115] dhis@dhis2 ERROR: column "eventoutputtype" of relation "programindicator" does not exist
2019-11-13 19:27:11.327 UTC [5115] dhis@dhis2 STATEMENT: alter table programindicator drop column eventoutputtype
2019-11-13 19:27:11.341 UTC [5118] dhis@dhis2 ERROR: index "index_patientdatavalue" does not exist
2019-11-13 19:27:11.341 UTC [5118] dhis@dhis2 STATEMENT: drop index index_patientdatavalue
2019-11-13 19:27:11.345 UTC [5119] dhis@dhis2 ERROR: relation "trackedentityform" does not exist at character 69
2019-11-13 19:27:11.345 UTC [5119] dhis@dhis2 STATEMENT: update program p set dataentryformid = (select dataentryformid from trackedentityform tf where tf.programid=p.programid limit 1)
2019-11-13 19:27:11.349 UTC [5120] dhis@dhis2 ERROR: table "trackedentityform" does not exist
2019-11-13 19:27:11.349 UTC [5120] dhis@dhis2 STATEMENT: drop table trackedentityform
2019-11-13 19:27:11.445 UTC [5137] dhis@dhis2 ERROR: column "programstagesectionid" does not exist at character 104
2019-11-13 19:27:11.445 UTC [5137] dhis@dhis2 HINT: There is a column named "programstagesectionid" in table "programstagesection_dataelements", but it cannot be referenced from this part of the query.
2019-11-13 19:27:11.445 UTC [5137] dhis@dhis2 STATEMENT: insert into programstagesection_dataelements (programstagesectionid, sort_order, dataelementid) select programstagesectionid, section_sort_order, dataelementid from programstagedataelement where programstagesectionid is not null and section_sort_order is not null
2019-11-13 19:27:11.490 UTC [5147] dhis@dhis2 ERROR: column "allowauditlog" of relation "program" does not exist
2019-11-13 19:27:11.490 UTC [5147] dhis@dhis2 STATEMENT: alter table program drop column allowauditlog
2019-11-13 19:27:11.525 UTC [3637] dhis@dhis2 ERROR: relation "reporttable_indicators" does not exist at character 40
2019-11-13 19:27:11.525 UTC [3637] dhis@dhis2 STATEMENT: select reporttableid, indicatorid from reporttable_indicators order by reporttableid, sort_order
2019-11-13 19:27:11.526 UTC [3637] dhis@dhis2 ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-13 19:27:11.526 UTC [3637] dhis@dhis2 STATEMENT:
2019-11-13 19:27:11.527 UTC [3637] dhis@dhis2 ERROR: relation "reporttable_orgunitgroups" does not exist at character 61
2019-11-13 19:27:11.527 UTC [3637] dhis@dhis2 STATEMENT: select distinct d.reporttableid, gsm.orgunitgroupsetid from reporttable_orgunitgroups d inner join orgunitgroupsetmembers gsm on d.orgunitgroupid=gsm.orgunitgroupid
2019-11-13 19:27:11.530 UTC [3637] dhis@dhis2 ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-13 19:27:11.530 UTC [3637] dhis@dhis2 STATEMENT: