Nextcloud version (eg, 20.0.5): 12.0.12
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04.2 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29 (Ubuntu)
PHP version (eg, 7.4): PHP 7.1.29
The issue you are facing:
I have decided to move from owncloud do nexcloud. Migration went rather flawless but, now, during the first update from 12 → 13, I have encountered an error during the update of twofactor_backupcodes. Updater wants to update mysql with null command: “Column ‘used’ cannot be null”.
Anyone got similar problem? I have tried to disable/remove twofactor_backupcodes, but it’s impossible.
Updating <twofactor_backupcodes> ... Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO `oc_twofactor_backupcodes` (`user_id`, `code`, `used`) VALUES(?, ?, ?)' with params ["***", "***", null]: SQLSTATE: Integrity constraint violation: 1048 Column 'used' cannot be null Update failed
Unfortunately I have run out of ideas how to fix this.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Update from owncloud 10.0 to Nexcloud 12, then to 13
The output of your config.php file in
/path/to/nextcloud (make sure you remove any identifiable information!):
<?php $CONFIG = array ( 'trusted_domains' => array ( ), 'dbtype' => 'mysql', 'version' => '22.214.171.124', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'logtimezone' => 'UTC', 'installed' => true, 'log_type' => 'owncloud', 'logfile' => 'owncloud.log', 'loglevel' => '3', 'logdateformat' => 'F d, Y H:i:s', 'maintenance' => false, 'theme' => '', 'enable_previews' => true, );