Text app of NC19.0.5 is broken and prevents from upgrading to NC20.0.2

When I’m trying to upgrade from my 19.0.5 to 20.0.2 via updater/updater.phar the upgrade itself finishes successful, but the subsequent occ upgrade command fails while updating the apps, because it claims that the table oc_text_documents is not exiting in my database. I just checked that and this is right. I also checked that the text app (where this table is related to, right?) is not working. I don’t know since when, since I never used it…

So:
How can I fix this? Disabling / Enabling the text app does not make it work again, uninstalling / installing neither. Deleting the “text” folder from the freshly upgraded 20.0.2 before performing occ upgrade also ends in an error ;-).

What about creating the missing table manually. Here is its layout:

> describe oc_text_documents;
+-------------------------+---------------------+------+-----+---------+-------+
| Field                   | Type                | Null | Key | Default | Extra |
+-------------------------+---------------------+------+-----+---------+-------+
| id                      | bigint(20) unsigned | NO   | PRI | NULL    |       |
| current_version         | bigint(20) unsigned | YES  |     | 0       |       |
| last_saved_version      | bigint(20) unsigned | YES  |     | 0       |       |
| last_saved_version_time | bigint(20) unsigned | NO   |     | NULL    |       |
| last_saved_version_etag | varchar(64)         | YES  |     |         |       |
| base_version_etag       | varchar(64)         | YES  |     |         |       |
+-------------------------+---------------------+------+-----+---------+-------+

That helped to perform the upgrade, thanks! However, the upgraded 20.0.2 instance is broken afterwards, I’m not even able to log in. Looks like something else is broken as well…

Check the Nextcloud log file for any related messages and open a new help request if you couldn’t find an answer using the search function of this forum.