Error Upgrade in Files_Sharing

Hello to everyone,
i have this problem on update db from vers 8 to last one stable,
i run this command:
sudo -u www-data php occ upgrade

and he give me error when arrive on update files_sharing:
Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'UPDATE oc_share SET uid_owner = ?, uid_initiator = ? WHERE id = ?' with params [null, "XXXXXXXXi", 103]:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid_owner' cannot be null
Update failed

Any idea ??
i have ubuntu LTS 16.10 and latest version of mySql

thanks in advance

Which steps have you done between the update from 8 to the "last one stable"?

Sorry for delay,
i was very busy in this days... i have migrated owncloud 8 installed on qnap to another machine with ubuntu and owncloud 9 .. i have also migrated db and files and folders. when i try to update with this command: sudo -u www-data php occ upgrade

i recieve that error