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?
This commit is contained in:
Elrond 2011-12-24 18:12:38 +01:00
parent 19ed039ba6
commit c6263400cf
2 changed files with 2 additions and 1 deletions

View File

@ -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")

View File

@ -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)