Fixing migration to account for new fields added to User model

Uploaded and upload_limit were added after this migration was first written.
Tricky!
This commit is contained in:
Christopher Allan Webber 2013-10-09 13:32:02 -05:00
parent eedb6d1f3b
commit a4609dd32b

View File

@ -594,6 +594,8 @@ class User_vR1(declarative_base()):
license_preference = Column(Unicode) license_preference = Column(Unicode)
url = Column(Unicode) url = Column(Unicode)
bio = Column(UnicodeText) # ?? bio = Column(UnicodeText) # ??
uploaded = Column(Integer, default=0)
upload_limit = Column(Integer)
@RegisterMigration(18, MIGRATIONS) @RegisterMigration(18, MIGRATIONS)
@ -702,7 +704,9 @@ def create_moderation_tables(db):
wants_notifications=row.wants_notifications, wants_notifications=row.wants_notifications,
license_preference=row.license_preference, license_preference=row.license_preference,
url=row.url, url=row.url,
bio=row.bio)) bio=row.bio,
uploaded=row.uploaded,
upload_limit=row.upload_limit))
db.commit() db.commit()
user_table.drop() user_table.drop()