Missing tables in Nextcloud 15.0.5

It seems that my Nextcloud installation is missing various tables. I cannot say when this problem started, but I updated from Owncloud to Nextcloud. Maybe this is the reason for those problems. Regarding the log the tables oc_directlink, oc_calendar_rooms, oc_calendar_invitations and more are missing. There are also some columns missing on other tables. Is there an explanation how this could happen and is there an easy way to fix this?

There are commands to repair files and db. See

https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/occ_command.html?highlight=repair#maintenance-commands-label

I’ve already tried the repair command, but that didn’t help. I created a completeley new database so I can compare both databases, but I just found some misssing indices that I’ve now added. It seems that the calendar needs some new fields in the database that are missing in the db create script. I found the following missing colums:

oc_calendarchanges: calendartype
oc_calendarobjects: calendartype
oc_calendarobjects_props: calendartype
oc_calendarsubscriptions: synctoken

I also found this thread where I found some create scripts that I used to create the other missing tables.

I’ve also manually added those columns and the errors regarding the calendar are gone now. I guess something went wrong with the latest calendar update that those columns are not automatically created. I will now monitor the log to see if any more missing or incomplete tables are reported.