One good place could be the standard template site-master.adp.
If you are using theme-selva you should instead modify the Header section of the css Selva-core.css where you can specify the url of your desired logo image.
The version on oacs-5-2 branch is to run with .lrn 2.2. The table "dotlrn_site_templates" does not exist in previous version, that's why you got the error.