aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/mongo/migrations.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2012-02-18 11:32:28 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2012-02-18 12:50:30 +0100
commitfeba5c5287a7cb4c0ed8f5124ad60a8a291770ad (patch)
tree0a70ac50d1ef5c6093bf682526d9843e20945275 /mediagoblin/db/mongo/migrations.py
parent1e72e075f8d542f4aa1ad0262f4fd1a5645cc731 (diff)
downloadmediagoblin-feba5c5287a7cb4c0ed8f5124ad60a8a291770ad.tar.lz
mediagoblin-feba5c5287a7cb4c0ed8f5124ad60a8a291770ad.tar.xz
mediagoblin-feba5c5287a7cb4c0ed8f5124ad60a8a291770ad.zip
Drop pre-rendered html: MediaComment.content_html
After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaComment.content_html part.
Diffstat (limited to 'mediagoblin/db/mongo/migrations.py')
-rw-r--r--mediagoblin/db/mongo/migrations.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mediagoblin/db/mongo/migrations.py b/mediagoblin/db/mongo/migrations.py
index 57da7dd8..59035f3b 100644
--- a/mediagoblin/db/mongo/migrations.py
+++ b/mediagoblin/db/mongo/migrations.py
@@ -130,7 +130,12 @@ def mediaentry_add_license(database):
@RegisterMigration(9)
def remove_calculated_html(database):
"""
- Drop bio_html, description_html again and calculate things on the fly (and cache)
+ Drop pre-rendered html again and calculate things
+ on the fly (and cache):
+ - User.bio_html
+ - MediaEntry.description_html
+ - MediaComment.content_html
"""
drop_table_field(database, 'users', 'bio_html')
drop_table_field(database, 'media_entries', 'description_html')
+ drop_table_field(database, 'media_comments', 'content_html')