Merge branch 'master' into derek-moore-bug405_email_notifications_for_comments
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 18 Mar 2012 17:12:41 +0000 (12:12 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 18 Mar 2012 17:12:41 +0000 (12:12 -0500)
Conflicts:
mediagoblin/db/mongo/migrations.py

1  2 
mediagoblin/db/mongo/migrations.py
mediagoblin/db/sql/models.py
mediagoblin/user_pages/views.py

index 3de3694ea59d74235ebbf633fde084c76d97449b,1d33460ea00ad15e72e7b033da09934b02217e9f..1984ecc49ea91993094dc743300335b4eeee93b3
@@@ -155,8 -155,17 +155,24 @@@ def convert_video_media_data(database)
          collection.save(document)
  
  @RegisterMigration(11)
+ def convert_gps_media_data(database):
+     """
+     Move media_data["gps"]["*"] to media_data["gps_*"].
+     In preparation for media_data.gps_*
+     """
+     collection = database['media_entries']
+     target = collection.find(
+         {'media_data.gps': {'$exists': True}})
+     for document in target:
+         for key, value in document['media_data']['gps'].iteritems():
+             document['media_data']['gps_' + key] = value
+         del document['media_data']['gps']
+         collection.save(document)
++
++@RegisterMigration(12)
 +def user_add_wants_comment_notification(database):
 +    """
 +    Add wants_comment_notification to user model
 +    """
 +    add_table_field(database, 'users', 'wants_comment_notification', True)
Simple merge
Simple merge