Repository navigation
Closed
Labels
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
occ maintenance:repair triggers an error. Not sure if there are any negative side effects of this, as this happened during a update. Also happens when running the occ command manually, so it's reproducable. Introduced (for me) with 27.1.7.2 update.
Likely because the occ command still checks hardcoded for the “oc” prefix… which fails if that prefix has been changed, like it is in my case: nextcloud.nc_file_metadata is the correct, existing table.
Steps to reproduce
- Rename "nextcloud.oc_file_metadata" to e. g. "nextcloud.nc_file_metadata"
- Run "occ maintenance:repair"
- Check NC log
Expected behavior
NC server checks for the existence based on any prefix naming convention, not the legacy hardcoded "oc" one. OwnCloud times are a real thing from the past for many many years... time to adopt to that reality code-wise maybe :-)
Installation method
None
Nextcloud Server version
27
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
[no app in context] Fehler: Doctrine\DBAL\Schema\SchemaException: There is no table with name 'nextcloud.oc_file_metadata' in the schema. at <<closure>>
0. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Schema/Schema.php line 189
Doctrine\DBAL\Schema\SchemaException::tableDoesNotExist()
1. /var/www/nextcloud/lib/private/Repair/AddMetadataMigrationJob.php line 44
Doctrine\DBAL\Schema\Schema->getTable()
2. /var/www/nextcloud/lib/private/Repair.php line 128
OC\Repair\AddMetadataMigrationJob->run()
3. /var/www/nextcloud/lib/private/Updater.php line 299
OC\Repair->run()
4. /var/www/nextcloud/lib/private/Updater.php line 139
OC\Updater->doUpgrade()
5. /var/www/nextcloud/core/Command/Upgrade.php line 225
OC\Updater->upgrade()
6. /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php line 298
OC\Core\Command\Upgrade->execute()
7. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 1040
Symfony\Component\Console\Command\Command->run()
8. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 301
Symfony\Component\Console\Application->doRunCommand()
9. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 171
Symfony\Component\Console\Application->doRun()
10. /var/www/nextcloud/lib/private/Console/Application.php line 218
Symfony\Component\Console\Application->run()
11. /var/www/nextcloud/console.php line 100
OC\Console\Application->run()
12. /var/www/nextcloud/occ line 11
require_once("/var/www/nextcloud/console.php")
at 2024-03-03T21:15:32+01:00
[updater] Fehler: OC\Repair\Events\RepairErrorEvent: Repair error: There is no table with name 'nextcloud.oc_file_metadata' in the schema.
at 2024-03-03T21:15:32+01:00
[no app in context] Fehler: Doctrine\DBAL\Schema\SchemaException: There is no table with name 'nextcloud.oc_file_metadata' in the schema. at <<closure>>
0. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Schema/Schema.php line 189
Doctrine\DBAL\Schema\SchemaException::tableDoesNotExist()
1. /var/www/nextcloud/lib/private/Repair/AddMetadataMigrationJob.php line 44
Doctrine\DBAL\Schema\Schema->getTable()
2. /var/www/nextcloud/lib/private/Repair.php line 128
OC\Repair\AddMetadataMigrationJob->run()
3. /var/www/nextcloud/core/Command/Maintenance/Repair.php line 123
OC\Repair->run()
4. /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php line 298
OC\Core\Command\Maintenance\Repair->execute()
5. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 1040
Symfony\Component\Console\Command\Command->run()
6. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 301
Symfony\Component\Console\Application->doRunCommand()
7. /var/www/nextcloud/3rdparty/symfony/console/Application.php line 171
Symfony\Component\Console\Application->doRun()
8. /var/www/nextcloud/lib/private/Console/Application.php line 218
Symfony\Component\Console\Application->run()
9. /var/www/nextcloud/console.php line 100
OC\Console\Application->run()
10. /var/www/nextcloud/occ line 11
require_once("/var/www/nextcloud/console.php")
at 2024-03-03T21:29:08+01:00
Activity
solracsf commentedon Mar 3, 2024
Cc @artonge
bcutter commentedon Mar 4, 2024
From a users perspective:
solracsf commentedon Mar 4, 2024
occ maintenance:repairbcutter commentedon Mar 4, 2024
Patched it manually and ran
occ maintenance:repairwhich also showed the- Queue a job to migrate the file_metadata table and delete the metadata column once emptyline. Not sure if it did what it is supposed to do, but at least there are no related errors anymore in the NC log.Short: confirmed working.
solracsf commentedon Mar 4, 2024
Yes, this is the purpose.
Tucubanito07 commentedon Sep 17, 2024
Hello @solracsf ,
I am trying to update from 29.0.5.1 to 29.0.7.1 and I am getting this error which seems like os this same issue.
Updating database schema
Exception: Database error when running migration 28000Date20240828142927 for app core
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'sarahbusinessnextcloud.oc_jobs' doesn't exist in engine
Update failed
I looked on the database and this is what I see.
Are you able to explain to me what I need to do to fix this issue. I dont understand how to get it fixed please.