From a4609dd32b3b0db2f2317b8b407b515b41bd0127 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 9 Oct 2013 13:32:02 -0500 Subject: [PATCH] Fixing migration to account for new fields added to User model Uploaded and upload_limit were added after this migration was first written. Tricky! --- mediagoblin/db/migrations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index 0356c672..a1a7c576 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -594,6 +594,8 @@ class User_vR1(declarative_base()): license_preference = Column(Unicode) url = Column(Unicode) bio = Column(UnicodeText) # ?? + uploaded = Column(Integer, default=0) + upload_limit = Column(Integer) @RegisterMigration(18, MIGRATIONS) @@ -702,7 +704,9 @@ def create_moderation_tables(db): wants_notifications=row.wants_notifications, license_preference=row.license_preference, url=row.url, - bio=row.bio)) + bio=row.bio, + uploaded=row.uploaded, + upload_limit=row.upload_limit)) db.commit() user_table.drop()