From: Christopher Allan Webber Date: Wed, 18 Sep 2013 16:21:57 +0000 (-0500) Subject: Merge remote-tracking branch 'refs/remotes/rodney757/file_limits' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=28eab59acef05b5f38052941483f900d2e78c50b;p=mediagoblin.git Merge remote-tracking branch 'refs/remotes/rodney757/file_limits' Conflicts: mediagoblin/db/migrations.py --- 28eab59acef05b5f38052941483f900d2e78c50b diff --cc mediagoblin/db/migrations.py index 62fb7e8d,b3dca72c..e2a0bf26 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@@ -465,12 -463,20 +465,32 @@@ 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()