-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Labels
Description
Steps to reproduce
- Nextcloud instance with PostgreSQL database
- Use
occ db:convert-typeto migrate to MySQL - Fails on
oc_mail_attachmentstable migration
Expected behavior
Database migration should succeed
Actual behavior
Database migration fails with:
- oc_mail_attachments
16/16 [============================] 100% < 1 sec/< 1 sec
In ExceptionConverter.php line 58:
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mydb`.`oc_mail_attachments`, CONSTRAINT `attachment_local_message` FOREIGN KEY (`local_message_id`) REFERENCES `oc_mail_local_messages` (`id`) ON DELETE CASCADE)
In Exception.php line 30:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mydb`.`oc_mail_attachments`, CONSTRAINT `attachment_local_message` FOREIGN KEY (`local_message_id`) REFERENCES `oc_mail_local_messages` (`id`) ON DELETE CASCADE)
In Statement.php line 101:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mydb`.`oc_mail_attachments`, CONSTRAINT `attachment_local_message` FOREIGN KEY (`local_message_id`) REFERENCES `oc_mail_local_messages` (`id`) ON DELETE CASCADE)Mail app version
3.5.5
Mailserver or service
OVH
Operating system
Debian 11
PHP engine version
PHP 8.2
Web server
Nginx
Database
PostgreSQL
Additional info
Migration to MySQL utf8mb4 database.