I have fixed it now. Had to do a fresh installation on a new VM just to see how the table is supposed to look like as I still couldn’t find any schema description. Quite annoying…
But my old installation is working again. You don’t have to migrate to a fresh instance.
Here what the table looks like on a fresh 20.0.4 installation:
±----------------±--------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±----------------±--------------±-----±----±--------±---------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| parent | bigint(20) | YES | | -1 | |
| share_type | int(11) | YES | | NULL | |
| remote | varchar(512) | NO | | NULL | |
| remote_id | varchar(255) | YES | | | |
| share_token | varchar(64) | NO | | NULL | |
| password | varchar(64) | YES | | NULL | |
| name | varchar(64) | NO | | NULL | |
| owner | varchar(64) | NO | | NULL | |
| user | varchar(64) | NO | MUL | NULL | |
| mountpoint | varchar(4000) | NO | | NULL | |
| mountpoint_hash | varchar(32) | NO | | NULL | |
| accepted | int(11) | NO | | 0 | |
±----------------±--------------±-----±----±--------±---------------+
They’ve done - or have not done, depending from where you actually look at it
- 3 changes to that table.
2 new columns: parent, share_type
1 modified column: remote_id (type, null, default)
You just have to create these two new columns and modify the existing one and your nextcloud will be working fine again.
I have a mysql server running in the snap package, so what I have done is:
- connect to the DB server, in my case (using the snap):
nextcloud.mysql-client - change into the nextcloud DB:
use nextcloud; - create the “parent” column:
alter table oc_share_external add parent bigint(20) NULL default -1 after id; - create the “share_type” column:
alter table oc_share_external add share_type int(11) NULL default NULL after parent; - modify the “remote_id” column:
alter table oc_share_external modify column remote_id varchar(255) NULL default '';
That’s it…