So I have a dev site that has all the same data as our live site. I made a copy of the dev site and upgraded it to Drupal 7. Ran into the below problem and just thought I would share in case it is relevant to anyone.
I followed the instructions in the upgrade.txt file. Everything seemed to work except for one of the database updates failed when I ran update.php. I tried just running update.php a second time and received the below message.
system module
Update #7061
* Failed: DatabaseSchemaObjectExistsException: Table system_update_7061 already exists. in DatabaseSchema->createTable() (line 623 of /srv/www/htdocs/sdma7/includes/database/schema.inc).
So I looked in the mysql database and the table system_update_7061 was there so I dropped it and tried to run update.php again. Received the below.
system module
Update #7061
* Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://2008MONTHLYMEALPRICES_Lunch.pdf' for key 2: INSERT INTO {file_managed} (fid, uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 127 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 2008MONTHLYMEALPRICES_Lunch.pdf [:db_insert_placeholder_3] => public://2008MONTHLYMEALPRICES_Lunch.pdf [:db_insert_placeholder_4] => application/pdf [:db_insert_placeholder_5] => 71748 [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => 1235152428 ) in system_update_7061() (line 2850 of /srv/www/htdocs/sdma7/modules/system/system.install).
After that I went into the file_managed table and removed all references to the pdf file mentioned in the error above. After that I re-ran update.php again and all was well. Not sure if this was just a corrupt database entry or if there is a bigger problem?
Comments
Problem with duplicate filenames
I ran into this same problem upgrading to RC-1. I think it chokes on any duplicate filenames in the files table. I don't know if there aren't supposed to be any, but some combination of options on 6 can let it happen or what?
upgrade problems
I received the following upgrade error:
DatabaseSchemaObjectExistsException: Cannot add index system_list to table system: index already exists. in DatabaseSchema_mysql->addIndex() (line 433 of /home/books/public_html/includes/database/mysql/schema.inc).
Several 6.20 -> 7.0-rc3 failed attempts later...
I've made multiple attempts to upgrade 6.20 -> 7.0-rc3 and every attempt fails as I describe here http://drupal.org/node/1006932#comment-3866950.
I hope that you might have a comment to set me on the correct road. Any suggestions you have are appreciated!
Thanks,
Dale
file permissions
Are the file permissions set correctly on the new install?
How would I know?
Hi stuen93;
Thanks for your comment! How would I know if my file permissions were correct? Would the upgrade give me some indication that this is the problem?
I look forward to hearing from you,
DaleEMoore@gMail.Com