Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' into mergetest
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user