From bc7607c1c4e31b9583a6a772c41567c1b1928e6d Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sat, 27 Aug 2005 06:11:30 +0000 Subject: Bug 305333: Move attachments.thedata to its own table Patch by Joel Peshkin r=lpsolit, a=justdave --- contrib/jb2bz.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'contrib/jb2bz.py') diff --git a/contrib/jb2bz.py b/contrib/jb2bz.py index ed8231dfc..e2f502927 100644 --- a/contrib/jb2bz.py +++ b/contrib/jb2bz.py @@ -248,10 +248,13 @@ def process_jitterbug(filename): for a in current['attachments']: cursor.execute( "INSERT INTO attachments SET " \ "bug_id=%s, creation_ts=%s, description='', mimetype=%s," \ - "filename=%s, thedata=%s, submitter_id=%s", + "filename=%s, submitter_id=%s", [ current['number'], time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]), - a[1], a[0], a[2], reporter ]) + a[1], a[0], reporter ]) + cursor.execute( "INSERT INTO attach_data SET " \ + "id=LAST_INSERT_ID(), thedata=%s", + [ a[2] ]) cursor.close() db.close() -- cgit v1.2.3-24-g4f1b