There is no table with name 'nextcloud.oc_file_metadata' in the schema

Nextcloud version: 26.0.1
Operating system and version (eg, Ubuntu 20.04): Unraid 6.11.5
Apache or nginx version (eg, Apache 2.4.25): 2022/08/20
PHP version (eg, 7.4): 8.0 (on 8.1 same issue)

Hello!
I’m facing some weird problems and I’d like to just remove an entry, where the file oc_file_metadata is no longer required while upgrade. Hopefully it’s possible

Full message from occ upgrade:

occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
**Exception: Database error when running migration 27000Date20230309104325 for app core**
**There is no table with name 'nextcloud.oc_file_metadata' in the schema.**
Update failed
Maintenance mode is kept active
Resetting log level

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. had Version 25.0.1, cause files and folder were not visible on the webpage → upgrade to 25.0.6

  2. files and folders are visible again, but cant upload files (error: “encryption not ready: multikeyencryption failed error:0480006C:PEM routines::no start line”). Tried to figure it out, but noticed a newer version, so → upgrade to 26.0.1

  3. upgrade fails while running command “occ upgrade”, result → look above

  4. did a rollback to 25.0.1 to check if the file oc_file_metadata exists whitin mariadb. No such file available.

(5. tried changing php version, adding some phantom files into mariadb, tried different commands (look below), enabling and disabling the app “metadata” in commandline and more, but can’t remember anymore in which order. Now I’m scraching my head and almost want to make a fresh install, but it seems like it’ll be a simple solution. The release notes are mentioning something about metadata migration)

The output of occ db:add-missing-indices :

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Check indices of the oc_mounts table.
Done.

The output of occ maintenance:repair :

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Add token cleanup job
 - Clean up abandoned apps
 - Add possibly missing system config
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 2 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects
    0 [->--------------------------]
 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
     - 0 calendar subscriptions without an user have been cleaned up
 - Remove invalid object properties
     - 0 invalid object properties removed.
 - Write default encryption module configuration to the database
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Restore default tags that are missing
     - Looking up default tags
     - 0 accounts to check found
    0 [--------->------------------]
 - Add a generated message-id to all Mail messages that have none
     - Looking up messages without a message-id
 - Purify and migrate collected mail addresses
    0 [------------->--------------]
 - Insert background jobs for all accounts
    0 [---------------->-----------]
 - Make Mail itinerary extractor executable
 - Create or update provisioned Mail accounts
     - 0 accounts provisioned
 - Repair Broken Threads for all mail accounts
     - Repaired threads, 0 messages updated
 - Remove the unused News update job
     - Job does not exist, all good
 - Update OAuth token expiration times
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
 - Force-reset all Text sessions before Yjs migration
 - Initialize migration of background images from dashboard to theming app
 - Add background job to check for backup codes
 - Insert UUIDFix background job for user and group in batches
 - Remove deprecated refresh time markers for LDAP user records
 - Populating added database structures for workflows

The output of your Nextcloud log in Admin > Logging:

not accessible through web interface

The output of your config.php file in /path/to/nextcloud :

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'XXXXX',
  'passwordsalt' => 'XXXXX',
  'secret' => 'XXXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXXX',
    1 => 'XXXXX',
    2 => 'localhost',
  ),
  'dbtype' => 'mysql',
  'version' => '25.0.6.1',
  'overwrite.cli.url' => 'https://XXXXX',
  'overwritehost' => 'XXXXX',
  'overwriteprotocol' => 'https',
  'trusted_proxies' => 
  array (
    0 => 'swag',
  ),
  'dbname' => 'nextcloud',
  'dbhost' => 'XXXXX',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'nextcloud',
  'installed' => true,
  'maintenance' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'server',
  'mail_domain' => 'cs-customs.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.XXXX.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'XXXX',
  'mail_smtppassword' => 'XXXX',
  'default_phone_region' => 'DE',
  'theme' => '',
  'loglevel' => 0,
  'app_install_overwrite' => 
  array (
    0 => 'documentserver_community',
    1 => 'unsplash',
    2 => 'talk_matterbridge',
  ),
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

no idea how to extract it propperly from mariadb

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

no such file

Did you have an older version working?

When it does not work, did you have any errors in the log files?

You can disable the file-metadata in the config file:

I don’t know if you disable and enable it, if that recreates perhaps the table. I didn’t understand if you deleted the table, if you don’t want the function or if you just don’t have it and you don’t know why.

I’m having this error when I try to

php occ db:convert-filecache-bigint

How did you solve it?

Seeing the same after updating from NC v27.1.5.1 to v27.1.7.2 today (or when running sudo -u www-data php /var/www/nextcloud/occ maintenance:repair manually).

[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/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

Please note: there’s a table named “nextcloud.nc_file_metadata”. Seems like the updater etc. still check hardcoded for th “oc” prefix…

Anyone willing to raise this at GitHub?

Not sure what’s the actual impact of this.

Luckily, I was affected as well, so I created the bug report:

and someone else did one as well (that I didn’t spot before):

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.