The high level process ought to be this.
- Take a backup of the production database cnueu_drpldb to a .sql file named cnueu_drpldb6.sql to explicitly identify the Drupal version.
- Restore this to a non-production MySQL server so that the restored database name matches the restored dump file.
- Create an ‘export’ database called xfer_db. Extract what the needed from the D6 database by copying the images, files and node_revisions tables from the restored backup of the production database.
- Identify the page nodes that have images embedded in them from the Node Revisions table by the presence of the Image Assiste modules HTML string starting [Image_assist and extract the image node IDs from which the Image Assist module embeds the image in the posted node using the image NID value in the string in the node_revisions table. Write the page NID and image NID to the transfer database.
- Use the image NID to identify its FID (file ID) in the Files table.
- Enumerate the two tables and write the node ID, the file ID, the filepath and other metadata into a new custom table.
- Upgrade the D6 non-production website to D7 using my ‘discovered’ upgrade process.
- Use that new table to write the file path into the correct node record of a copy of the migrated databse within CSS to place the picture at top right of the poem area in an upgraded D7 version of the website on the non-production webesite.
Sounds simple, but I suspect the development of the necessary T-SQL script will be far from such. I have started a T-SQL techno-blog to capture this and other ‘snippets’, and store tips and reminders too. I will build this ‘Image Repair’ script in a posting in this techno-blog.