Merge branch 'master' into processing

Conflicts:
	mediagoblin/db/migrations.py
This commit is contained in:
Christopher Allan Webber
2011-08-11 22:54:11 -05:00
8 changed files with 50 additions and 47 deletions

View File

@@ -55,6 +55,16 @@ def mediaentry_mediafiles_main_to_original(database):
@RegisterMigration(3)
def mediaentry_remove_thumbnail_file(database):
"""
Use media_files['thumb'] instead of media_entries['thumbnail_file']
"""
database['media_entries'].update(
{'thumbnail_file': {'$exists': True}},
{'$unset': {'thumbnail_file': 1}},
@RegisterMigration(4)
def mediaentry_add_queued_task_id(database):
"""
Add the 'queued_task_id' field for entries that don't have it.

View File

@@ -171,8 +171,6 @@ class MediaEntry(Document):
- attachment_files: A list of "attachment" files, ones that aren't
critical to this piece of media but may be usefully relevant to people
viewing the work. (currently unused.)
- thumbnail_file: Deprecated... we should remove this ;)
"""
__collection__ = 'media_entries'
@@ -199,10 +197,7 @@ class MediaEntry(Document):
# The following should be lists of lists, in appropriate file
# record form
'attachment_files': list,
# This one should just be a single file record
'thumbnail_file': [unicode]}
'attachment_files': list}
required_fields = [
'uploader', 'created', 'media_type', 'slug']