The Image Assist Solution

The high level process ought to be this.

  1. Take a backup of the production database cnueu_drpldb to a .sql file named cnueu_drpldb6.sql to explicitly identify the Drupal version.
  2. Restore this to a non-production MySQL server so that the restored database name matches the restored dump file.
  3. 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.
  4. 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.
  5. Use the image NID to identify its FID (file ID) in the Files table.
  6. Enumerate the two tables and write the node ID, the file ID, the filepath and other metadata into a new custom table.
  7. Upgrade the D6 non-production website to D7 using my ‘discovered’ upgrade process.
  8. 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.