From: Christopher Allan Webber Date: Wed, 18 Sep 2013 19:45:23 +0000 (-0500) Subject: Merge remote-tracking branch 'refs/remotes/rodney757/reprocessing' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=529eb17b38ac08c956164e8b829ea556db1f32f4;p=mediagoblin.git Merge remote-tracking branch 'refs/remotes/rodney757/reprocessing' Conflicts: mediagoblin/db/migrations.py --- 529eb17b38ac08c956164e8b829ea556db1f32f4 diff --cc mediagoblin/db/migrations.py index e2a0bf26,508fcbab..a88518f4 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@@ -465,32 -463,11 +465,44 @@@ def create_oauth1_tables(db) @RegisterMigration(15, MIGRATIONS) +def wants_notifications(db): + """Add a wants_notifications field to User model""" + metadata = MetaData(bind=db.bind) + user_table = inspect_table(metadata, "core__users") + + col = Column('wants_notifications', Boolean, default=True) + col.create(user_table) + + db.commit() + + +@RegisterMigration(16, MIGRATIONS) +def upload_limits(db): + """Add user upload limit columns""" + metadata = MetaData(bind=db.bind) + + user_table = inspect_table(metadata, 'core__users') + media_entry_table = inspect_table(metadata, 'core__media_entries') + + col = Column('uploaded', Integer, default=0) + col.create(user_table) + + col = Column('upload_limit', Integer) + col.create(user_table) + + col = Column('file_size', Integer, default=0) + col.create(media_entry_table) + + db.commit() ++ ++ ++@RegisterMigration(17, MIGRATIONS) + def add_file_metadata(db): + """Add file_metadata to MediaFile""" + metadata = MetaData(bind=db.bind) + media_file_table = inspect_table(metadata, "core__mediafiles") + + col = Column('file_metadata', JSONEncoded) + col.create(media_file_table) ++ + db.commit()