From c6263400cfd334a820122bd1b22eaa4d4d6765cd Mon Sep 17 00:00:00 2001 From: Elrond Date: Sat, 24 Dec 2011 18:12:38 +0100 Subject: [PATCH] SQL Model: Forgot MediaEntry.state field While creating the new SQL model, the "state" field of MediaEntry was left out. Currently using a plain unicode string for it. Maybe should use sqlalchemy.types.Enum? --- mediagoblin/db/sql/convert.py | 2 +- mediagoblin/db/sql/models.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mediagoblin/db/sql/convert.py b/mediagoblin/db/sql/convert.py index 6de758ed..c6bed1e9 100644 --- a/mediagoblin/db/sql/convert.py +++ b/mediagoblin/db/sql/convert.py @@ -62,7 +62,7 @@ def convert_media_entries(mk_db): copy_attrs(entry, new_entry, ('title', 'slug', 'created', 'description', 'description_html', - 'media_type', + 'media_type', 'state', 'fail_error', 'queued_task_id',)) copy_reference_attr(entry, new_entry, "uploader") diff --git a/mediagoblin/db/sql/models.py b/mediagoblin/db/sql/models.py index 68b078a5..268f5715 100644 --- a/mediagoblin/db/sql/models.py +++ b/mediagoblin/db/sql/models.py @@ -58,6 +58,7 @@ class MediaEntry(Base): description = Column(UnicodeText) # ?? description_html = Column(UnicodeText) # ?? media_type = Column(Unicode, nullable=False) + state = Column(Unicode, nullable=False) # or use sqlalchemy.types.Enum? fail_error = Column(Unicode) fail_metadata = Column(UnicodeText) -- 2.25.1