summaryrefslogtreecommitdiffstats
path: root/contrib/jb2bz.py
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-08-27 08:11:30 +0200
committerbugreport%peshkin.net <>2005-08-27 08:11:30 +0200
commitbc7607c1c4e31b9583a6a772c41567c1b1928e6d (patch)
tree3b370d740050b6bb2ec9013f374802585170f409 /contrib/jb2bz.py
parentd8a52b79b5b12e2e002614bc0aea343a9a535258 (diff)
downloadbugzilla-bc7607c1c4e31b9583a6a772c41567c1b1928e6d.tar.gz
bugzilla-bc7607c1c4e31b9583a6a772c41567c1b1928e6d.tar.xz
Bug 305333: Move attachments.thedata to its own table
Patch by Joel Peshkin <bugreport@peshkin.net> r=lpsolit, a=justdave
Diffstat (limited to 'contrib/jb2bz.py')
-rw-r--r--contrib/jb2bz.py7
1 files changed, 5 insertions, 2 deletions
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()