diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-08-11 22:54:11 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-08-11 22:54:11 -0500 |
commit | ba4858c5b4f639d0438b7a6d53a7a731424a430d (patch) | |
tree | 69ad17bc78d0b188fd6c9e75d40e4e390ca318fd /mediagoblin/db | |
parent | 07934b442f7cd3abae18eecdf533de004f88e6b1 (diff) | |
parent | 788272f30034fb2f917496197e317226d21aad2e (diff) | |
download | mediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.tar.lz mediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.tar.xz mediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.zip |
Merge branch 'master' into processing
Conflicts:
mediagoblin/db/migrations.py
Diffstat (limited to 'mediagoblin/db')
-rw-r--r-- | mediagoblin/db/migrations.py | 10 | ||||
-rw-r--r-- | mediagoblin/db/models.py | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index 797d39de..36bca5b3 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -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. diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 23527e84..0dcb6ce8 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -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'] |