Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' into mergetest

This commit is contained in:
Christopher Allan Webber
2013-01-22 13:43:02 -06:00
6 changed files with 62 additions and 36 deletions

View File

@@ -184,3 +184,15 @@ def fix_CollectionItem_v0_constraint(db_conn):
pass
db_conn.commit()
@RegisterMigration(8, MIGRATIONS)
def add_license_preference(db):
metadata = MetaData(bind=db.bind)
user_table = Table('core__users', metadata, autoload=True,
autoload_with=db.bind)
col = Column('license_preference', Unicode, default=u'')
col.create(user_table)
db.commit()

View File

@@ -63,6 +63,7 @@ class User(Base, UserMixin):
# Intented to be nullable=False, but migrations would not work for it
# set to nullable=True implicitly.
wants_comment_notification = Column(Boolean, default=True)
license_preference = Column(Unicode)
verification_key = Column(Unicode)
is_admin = Column(Boolean, default=False, nullable=False)
url = Column(Unicode)