Looking at your hq-install.log.debug, it seems like the database schema upgrade did not complete (it stopped at "Upgrading 3.81 -> 3.82", but the schema changes goes well past 3.140). However, there were no errors. Can you connect with the database and see what the value is for:
SELECT PROPVALUE FROM EAM_CONFIG_PROPS WHERE ID = 2;
If the PROPVALUE is 3.81, then try the statement in 3.82:
begin;
CREATE INDEX cresp_err_idx ON EAM_CONFIG_RESPONSE USING btree (validationerr);
rollback;
See if that index creation fails somehow.
Charles