When I try to update a certain site in a Drupal-Multisite-System I got several times the following error
Update #7201
Failed: DatabaseSchemaObjectExistsException: Die Datenbanktabelle file_type ist bereits vorhanden. in DatabaseSchema->createTable() (Zeile 657 von /home/www/web619/html/drupal_7_standard/includes/database/schema.inc).
Translated: The Database table file_type already exists.
When i delete the table the other tables are mentioned: file_type_mimetypes, file_type_streams, field_file_image_alt_text, field_file_image_title_text etc.
The other Sites in the system work now perfect with plupload etc. Media and File Entity are on a good way.
But, what I can do for the damaged site?
Thank you very much for your help.
Hans
Comments
Comment #1
Snakehead CreditAttribution: Snakehead commentedMeanwhiles i solved the problem like this:
I did deleted first these tables:
file_type_mimetypes
file_type_streams
field_data_field_file_image_alt_text
field_data_field_file_image_title_text
field_revision_field_file_image_alt_text
field_revision_field_file_image_title_text
Then I updated the Drupal site
I recreated all die fields for the file type document from the former site.
I adjusted all the concernded views because of the new title field.
I am happy that this has happened just to experimental Drupal 7 site with less media.
I hope this will never happen again.
Thanks for your attention.
Hans
Comment #2
TechNikh CreditAttribution: TechNikh commentedthanks Snakehead.
same issue.
Comment #3
PaulUrwin CreditAttribution: PaulUrwin commentedI think I have traced this issue to a problem when you revert your database by importing an old SQL export of your database.
1. Take an SQL export
2. install the updates
3. run the database updates
4. you now decide you want to restore the database for some reason so you import your export again
The Export does not include DROP statements for the new tables because they didn't previously exist, so after you import this time the new tables still exist
5. attempt the updates again and you will get the reported error about the tables already existing.
You address this by ensuring you DROP all tables before you import your export.
Comment #4
tchopshop CreditAttribution: tchopshop commentedSee this issue. This solved it for me:
http://drupal.org/node/1267748
Comment #5
tanius CreditAttribution: tanius commentedThis issue happened to me today when upgrading Drupal Commons from 7.x-3.9 to 7.x-3.12. Specifically, I got the following error message when running database update
commons_update_3115
: "Table file_type already exists."The reason could be as related in #3 (or possibly a flaw in the database updates for Commons 3.12, not taking into account that
file_entity
was a dependency in Commons 3.9 already, it was just not enabled).Anyway, for everyone running into this in the next days, here is how I solved this: first revert to a database backup (since Drupal does not bootstrap at this stage), then delete the problematic tables:
And finally run the database updates again, this time successfully:
drush update-db;
Comment #6
joyseeker CreditAttribution: joyseeker commentedI dropped the tables, and after the update, more updates went through, but I'm still getting an error. This time it's a bit different:
Failed: DatabaseSchemaObjectDoesNotExistException: Cannot add field file_type.mimetypes: table doesn't exist. in DatabaseSchema_mysql->addField() (line 325 of ../includes/database/mysql/schema.inc).
Comment #7
creact CreditAttribution: creact commentedI am having the same issue. Trying to run updates i get:
The following updates returned messages
file_entity module
Update #7204
Failed: DatabaseSchemaObjectExistsException: Table field_data_field_file_image_alt_text already exists. in DatabaseSchema->createTable() (line 657 of /includes/database/schema.inc).
Has anyone solved this yet?
Comment #8
ibonelli CreditAttribution: ibonelli commentedHi there,
Just to share another experience I had to do as Tanius did. I was not able to do the upgrade without droping tables first. I'm not sure if it was this module, interaction with others or what.
All I know is that "drush up" could not do the DB updates and that "drush updb" threw all kind of errors. Only way forward was to drop the tables that were blocking the upgrade (as system reported, weren't exactly the same as Tanius).
What I want to add though is that after upgrade drupal crashed due to lack of table "field_data_field_file_image_alt_text", only way to figure it out was using "drush watchdog-show", backend access was not available. To fix it I had to do all over again and before dropping the table do: drush sql-query "SHOW CREATE TABLE field_data_field_file_image_alt_text;". To recreate/run I had to connect directly to the DB (syntax was a bit messy for drush sql-query).
Hope it helps, otherwise just ask! Cheers, Ignacio
Comment #9
crystaldawn CreditAttribution: crystaldawn commentedThis should not have been closed since none of the proposed fixes actually work. This problem still exists even in the latest dev build when upgrading from earlier versions. The only workaround is to completely uninstall file_entity and start from scratch. Thats NOT an acceptable upgrade path as far as I'm concerned.
Comment #10
crystaldawn CreditAttribution: crystaldawn commentedIt should also be set to major since it blocks potential security updates that may eventually be needed since this module simply cannot be 'upgraded' properly.
Comment #11
rameshbalda CreditAttribution: rameshbalda commentedComment #12
rameshbalda CreditAttribution: rameshbalda commentedComment #13
joseph.olstadHi @rameshbalda, please edit comment #11 and highlight your code then press the 'PHP' button above the text area you'll be writing in.
this way your code will be formatted correctly for others to enjoy.
Thank you
Comment #14
joseph.olstadmost of these issues are resolved, most have upgraded now.