Thank you for posting this.
Below is the SQL to upgrade the attachments (providing you did not delete the old schema tables):
DELETE FROM gemini_issueattachments
SET IDENTITY_INSERT gemini_issueattachments ON
INSERT INTO gemini_issueattachments (fileid, projectid, issueid, commentid, contenttype, contentlength, thefilename, filecontent, created)
SELECT fileid, projid, issueid,
CASE WHEN commentid = 0 THEN NULL ELSE commentid END, contenttype, contentlength, thefilename, filecontent, created FROM issueattachments
WHERE issueid IN (SELECT issueid FROM gemini_issues)
AND ( commentid IN (SELECT commentid FROM gemini_issuecomments) OR commentid = 0)
SET IDENTITY_INSERT gemini_issueattachments OFF