- π¨π¦Canada jdhildeb
I hit this error in my development process working on a dev copy of a site.
It can be reproduced as follows:1. Remove a field from your database (Drupal will rename the database table).
2. Export configuration.
3. Load a database snapshot from production (for example to debug a separate issue).
4. Import configuration.
5. Error occurs. In my case: Unexpected error during import with operation delete for field.storage.node.field_need_date_change: Exception thrown while performing a schema update. Cannot rename 'node__field_need_date_change' to 'field_deleted_data_f21a3876bc';: table 'field_deleted_data_f21a3876bc'; already exists.The cause in my case was that I did not drop my existing database when loading the snapshot, I just simply loaded a mysqldump. This overwrites existing tables, but does not delete tables from your database which are not present in the new snapshot. So the previous copy of field_deleted_data_f21a3876bc from step 1 was still there in my local database, remained when loading the snapshot, and caused the error when I tried to import my configuration.
The workaround is to do drop database, create database before loading your snapshot, to clear out any unwanted tables like this.
- πΊπΈUnited States choicelildice
This error occurs on several of our sites when we try to remove the date_recur field. I have tried it on simplytest.me with version 3.3.0 on
a clean Drupal 10.4.1 and the same error occurs. I updated my local site to use version 3.8.1 and have the same error. I cannot test version 3.8.1 on Drupal 10 on simplytest.me so I have not tried that, but I'm guessing the same error will occur, since it happens on our site. Dropping the database and importing a snapshot as mentioned in #29 does not resolve the issue for us.