There will be two rounds of changes needed. Since we stopped writing image_comment_temp instead of doing a WRITE_BOTH mode, we went ahead and did the migration despite "round 1" not having been done. We can now move immediately to "round 2":
- On the comment table, replace the EXISTS clause referring to image_comment_temp with one referring to image
- On the image view:
- The img_description_id field is just img_description_id, nothing fancy.
- Remove the join against image_comment_temp
- On the image_compat view:
- The img_description_id field is just img_description_id, nothing fancy.
- For the img_description field, the test becomes just img_description_id = 0
- Remove the join against image_comment_temp
- The comment join condition becomes on comment_id = img_description_id
- Remove the line in index-conf.sql about the added index on image_comment_temp. Add one for image.