"Should I add back now all these tables I deleted" – these tables should have been created again during the 3.9 upgrade.
To recap to ensure we're both on the same page:
- The site was originally 3.7.
- There was an attempt to upgrade to 3.9.
- This attempt was rolled back and the 3.7 database restored "over" the 3.9 database leaving the new 3.9 tables in place.
- There was a subsequent attempt to upgrade to 3.9. This failed when Moodle tried to create the new 3.9 tables because they already existed. (This was the original question in this discussion thread).
- The new 3.9 tables were deleted using phpMyAdmin. (My suggestion).
- There was another attempt to upgrade to 3.9 which apparently succeeded.
So if the upgrade to 3.9 completed successfully in step 6. then the new 3.9 tables such as mdl_contentbank_content should have been created. If this table isn't there then that's concerning.
But you're correct: you would get "Error reading from database" if mdl_contentbank_content was missing.
So, can you confirm that mdl_contentbank_content is missing in phpMyAdmin? Are the other tables that were removed also still missing?