Opened 9 years ago

Closed 9 years ago

#5071 closed defect (fixed)

Error during db update

Reported by: mrb Owned by:
Priority: critical Milestone: 0.8.0
Component: programming Keywords: db, migration, video
Cc: Boris Bobrov Parent Tickets:



./bin/gmg dbupdate

produces the following backtrace:

Attachments (1)

issue_5071.patch (1.8 KB ) - added by Boris Bobrov 9 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by mrb, 9 years ago

Summary: Error up upgradingError during db update

comment:2 by mrb, 9 years ago

  • Running on commit 714008693e08fc8a229fb3f7822c70c132aade7f
  • Using postgresql
Last edited 9 years ago by mrb (previous) (diff)

comment:3 by mrb, 9 years ago

A workaround is to add '{}' values in the column 'orig_metadata' in the table 'videomediadata' where this column is empty and run the migration again.

comment:4 by ayleph, 9 years ago

Cc: Boris Bobrov added
Keywords: db migration video added
Milestone: 0.8.0
Status: newaccepted

comment:5 by ayleph, 9 years ago

breton, there's a small bug in at file mediagoblin/media_types/video/

If the orig_metadata row is empty, json.loads throws an error on line 62 before reaching the if not metadata: code on line 64.

comment:6 by Boris Bobrov, 9 years ago

Owner: set to Boris Bobrov
Priority: majorcritical
Status: acceptedin_progress

orig_metadata can be empty? That's a surprise to me!

Thank you for the bug report, I will fix it now.

comment:7 by ayleph, 9 years ago

It's a surprise to me too. I wonder if there's another bug that caused orig_metadata to be empty.

comment:8 by Boris Bobrov, 9 years ago

Owner: Boris Bobrov removed
Status: in_progressreview

Could anybody please test now with the patch?

by Boris Bobrov, 9 years ago

Attachment: issue_5071.patch added

comment:9 by Christopher Allan Webber, 9 years ago

I accidentally merged and pushed this. I'm testing, anyway! But it looks right to me.

comment:10 by Christopher Allan Webber, 9 years ago

Resolution: fixed
Status: reviewclosed

Works great! Closing!

Note: See TracTickets for help on using tickets.