When upgrading from Nextcloud 28.0.14 to 29.0.15, I got the following message:
InvalidArgumentException: Index name “fs_storage_mimepart” for table “oc_filecache” collides with the constraint on table “oc_oc_filecache_odczm3x37b7pp”
I restored the backup, noticed the php occ files section was not available;
so I ran php occ upgrade, now I could run php occ files:cleanup, all was back ok, but still on the old 28.0.14 .
I was hoping that the table “oc_oc_filecache_odczm3x37b7pp” was some old remnant that was cleaned up now, but when retrhying I got the exact same message.
So I restored my backup again, now I’m back on my old 28.0.14 running fine, but what to do to be able to upgrade ?
Is it safe to delete all records in oc_filecache? Will that solve my problem?
When running “show tables” I can see oc_filecache, but NOT oc_oc_filecache_odczm3x37b7pp .
When I run show create table oc_filecache it shows:
oc_filecache | CREATE TABLE oc_filecache
(
fileid
bigint(20) NOT NULL AUTO_INCREMENT,
storage
bigint(20) NOT NULL DEFAULT 0,
path
varchar(4000) DEFAULT NULL,
path_hash
varchar(32) NOT NULL DEFAULT ‘’,
parent
bigint(20) NOT NULL DEFAULT 0,
name
varchar(250) DEFAULT NULL,
mimetype
bigint(20) NOT NULL DEFAULT 0,
mimepart
bigint(20) NOT NULL DEFAULT 0,
size
bigint(20) NOT NULL DEFAULT 0,
mtime
bigint(20) NOT NULL DEFAULT 0,
encrypted
int(11) NOT NULL DEFAULT 0,
unencrypted_size
bigint(20) NOT NULL DEFAULT 0,
etag
varchar(40) DEFAULT NULL,
storage_mtime
bigint(20) NOT NULL DEFAULT 0,
permissions
int(11) DEFAULT 0,
checksum
varchar(255) DEFAULT NULL,
PRIMARY KEY (fileid
),
UNIQUE KEY fs_storage_path_hash
(storage
,path_hash
),
KEY fs_parent_name_hash
(parent
,name
),
KEY fs_storage_mimetype
(storage
,mimetype
),
KEY fs_storage_mimepart
(storage
,mimepart
),
KEY fs_storage_size
(storage
,size
,fileid
),
KEY fs_mtime
(mtime
),
KEY fs_size
(size
),
KEY fs_storage_path_prefix
(storage
,path
(64)),
KEY fs_id_storage_size
(fileid
,storage
,size
),
KEY fs_parent
(parent
)
) ENGINE=InnoDB AUTO_INCREMENT=768565 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED
show tables says:
MariaDB [owncloud]> show tables;
±-------------------------------+
| Tables_in_owncloud |
±-------------------------------+
| oc_accounts |
| oc_accounts_data |
| oc_activity |
| oc_activity_mq |
| oc_addressbookchanges |
| oc_addressbooks |
| oc_appconfig |
| oc_audioplayer_albums |
| oc_audioplayer_artists |
| oc_audioplayer_genre |
| oc_audioplayer_playlist_tracks |
| oc_audioplayer_playlists |
| oc_audioplayer_stats |
| oc_audioplayer_streams |
| oc_audioplayer_tracks |
| oc_audioplayer_whats_new |
| oc_authorized_groups |
| oc_authtoken |
| oc_bruteforce_attempts |
| oc_calendar_appt_bookings |
| oc_calendar_appt_configs |
| oc_calendar_invitations |
| oc_calendar_reminders |
| oc_calendar_resources |
| oc_calendar_resources_md |
| oc_calendar_rooms |
| oc_calendar_rooms_md |
| oc_calendarchanges |
| oc_calendarobjects |
| oc_calendarobjects_props |
| oc_calendars |
| oc_calendarsubscriptions |
| oc_cards |
| oc_cards_properties |
| oc_carnet_metadata |
| oc_circles_circle |
| oc_circles_event |
| oc_circles_member |
| oc_circles_membership |
| oc_circles_mount |
| oc_circles_mountpoint |
| oc_circles_remote |
| oc_circles_share_lock |
| oc_circles_token |
| oc_collres_accesscache |
| oc_collres_collections |
| oc_collres_resources |
| oc_comments |
| oc_comments_read_markers |
| oc_contacts_cards_properties |
| oc_dav_absence |
| oc_dav_cal_proxy |
| oc_dav_properties |
| oc_dav_shares |
| oc_direct_edit |
| oc_directlink |
| oc_e2e_encryption_lock |
| oc_external_applicable |
| oc_external_config |
| oc_external_mounts |
| oc_external_options |
| oc_federated_reshares |
| oc_file_locks |
| oc_file_metadata |
| oc_filecache |
| oc_filecache_extended |
| oc_files_metadata |
| oc_files_metadata_index |
| oc_files_reminders |
| oc_files_trash |
| oc_files_versions |
| oc_flow_checks |
| oc_flow_operations |
| oc_flow_operations_scope |
| oc_group_admin |
| oc_group_user |
| oc_groups |
| oc_jobs |
| oc_known_users |
| oc_ldap_group_mapping |
| oc_ldap_group_members |
| oc_ldap_user_mapping |
| oc_login_flow_v2 |
| oc_lucene_status |
| oc_mail_accounts |
| oc_mail_aliases |
| oc_mail_attachments |
| oc_mail_classifiers |
| oc_mail_coll_addresses |
| oc_mail_local_messages |
| oc_mail_mailboxes |
| oc_mail_message_tags |
| oc_mail_messages |
| oc_mail_provisionings |
| oc_mail_recipients |
| oc_mail_tags |
| oc_mail_trusted_senders |
| oc_migrations |
| oc_mimetypes |
| oc_mounts |
| oc_notifications |
| oc_notifications_pushhash |
| oc_notifications_settings |
| oc_oauth2_access_tokens |
| oc_oauth2_clients |
| oc_oc_filecache_odczm3x37b7pp |
| oc_open_local_editor |
| oc_persistent_locks |
| oc_photos_albums |
| oc_photos_albums_collabs |
| oc_photos_albums_files |
| oc_preferences |
| oc_privacy_admins |
| oc_privatedata |
| oc_profile_config |
| oc_properties |
| oc_ratelimit_entries |
| oc_reactions |
| oc_recent_contact |
| oc_schedulingobjects |
| oc_share |
| oc_share_external |
| oc_storages |
| oc_storages_credentials |
| oc_systemtag |
| oc_systemtag_group |
| oc_systemtag_object_mapping |
| oc_talk_attachments |
| oc_talk_attendees |
| oc_talk_bridges |
| oc_talk_commands |
| oc_talk_internalsignaling |
| oc_talk_invitations |
| oc_talk_poll_votes |
| oc_talk_polls |
| oc_talk_rooms |
| oc_talk_sessions |
| oc_text2image_tasks |
| oc_text_documents |
| oc_text_sessions |
| oc_text_steps |
| oc_textprocessing_tasks |
| oc_trusted_servers |
| oc_twofactor_backupcodes |
| oc_twofactor_providers |
| oc_twofactor_totp_secrets |
| oc_twofactor_u2f_registrations |
| oc_user_status |
| oc_user_transfer_owner |
| oc_users |
| oc_users_external |
| oc_vcategory |
| oc_vcategory_to_object |
| oc_webauthn |
| oc_whats_new |
±-------------------------------+
How to fix this? Am I missing a oc_mimeparts table ?
HELP greatly APPRECIATED!!