Opened 10 years ago
Closed 10 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: |
Description
Running
./bin/gmg dbupdate
produces the following backtrace:
Attachments (1)
Change History (11)
comment:1 by , 10 years ago
Summary: | Error up upgrading → Error during db update |
---|
comment:2 by , 10 years ago
- Running on commit 714008693e08fc8a229fb3f7822c70c132aade7f
- Using postgresql
comment:3 by , 10 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 , 10 years ago
Cc: | added |
---|---|
Keywords: | db migration video added |
Milestone: | → 0.8.0 |
Status: | new → accepted |
comment:5 by , 10 years ago
breton, there's a small bug in https://gitorious.org/mediagoblin/mediagoblin/commit/2d1e89055d52023a7600f35dd41564019f4d70c3 at file mediagoblin/media_types/video/migrations.py
.
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 , 10 years ago
Owner: | set to |
---|---|
Priority: | major → critical |
Status: | accepted → in_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 , 10 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 , 10 years ago
Owner: | removed |
---|---|
Status: | in_progress → review |
Could anybody please test now with the patch?
by , 10 years ago
Attachment: | issue_5071.patch added |
---|
comment:9 by , 10 years ago
I accidentally merged and pushed this. I'm testing, anyway! But it looks right to me.