Update to X from 9.1.5 - missing DB columns



An exception occurred while executing 'INSERT INTO oc_share (share_type, token, expiration, parent, share_name, item_type, item_source, file_source, permissions, uid_initiator, uid_owner, file_target, stime) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [3, "aNlouvb9izltiDt", "2017-05-11 00:00:00", null, "Public link", "folder", 10162, 10162, 1, "me@home.com", "me@home.com", "\/Public", 1493300865]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'share_name' in 'field list'

Upgraded from 9.1.5 to 10.0.0. Upgraded via 'occ upgrade'.


It should have been added in a migration step: https://github.com/owncloud/core/blob/74c8b0e68098b5e7fc20da30200a221f282f143c/core/Migrations/Version20170320173955.php#L36-L39

What DB are you using? Any errors in the owncloud log from the time during the upgrade?

Looking at the commit https://github.com/owncloud/core/commit/1bc67dd44aa8a3ada6b610b1b4186b2251d55a15 you should be able to fix this by manually adding the column:

ALTER TABLE oc_share ADD share_name VARCHAR(64);

This is only a quickfix and the actual SQL may differ depending on your DB. Tell us more about your setup. If possible add a github issue at https://github.com/owncloud/core/issues/new


I actually fixed this by reverting to last nights backup and running the whole upgrade again. There are still issues with the upgrade process - but I'll lodge these in different tickets - as they seem to be completely separate issues.