How to fix TYPO3 error "There is no column with name 't3ver_oid' on table"
Recently the following error message showed up in a project I was updating to TYPO3 9.5:
There is no column with name 't3ver_oid' on table 'tx_news_domain_model_news'.
When you see this message in a TYPO3 project, you should of course first check, if the field is really available in the mentioned table and second, you should check, if extension dependencies are correct.
When extending an Extbase extension (in this case ext:news), you must ensure, that the extending extension is loaded after the extension you extend. In order to do so, you must add a dependency to the extension you extend in your ext_emconf.php like shown below (example when extending ext:news):
After adding the dependency, make sure to regenerate PackageStates.php (“Dump Autoload Information” in install tool or “ composer dumpautoload” for composer projects)