Skip to content
Permalink
Browse files

Merge pull request #1490 from privacyidea/tokenowner-rowformat

Set mysql_row_format=DYNAMIC for tokenowner table
  • Loading branch information...
plettich committed Mar 7, 2019
2 parents 0645e8b + 77dea5c commit c89c5451dc12c73684f33d2e31ace56f69cd4d51
Showing with 3 additions and 1 deletion.
  1. +2 −1 migrations/versions/48ee74b8a7c8_.py
  2. +1 −0 privacyidea/models.py
@@ -71,7 +71,8 @@ def upgrade():
sa.Column('realm_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['realm_id'], ['realm.id'], ),
sa.ForeignKeyConstraint(['token_id'], ['token.id'], ),
sa.PrimaryKeyConstraint('id')
sa.PrimaryKeyConstraint('id'),
mysql_row_format='DYNAMIC'
)
op.create_index(op.f('ix_tokenowner_resolver'), 'tokenowner', ['resolver'], unique=False)
op.create_index(op.f('ix_tokenowner_user_id'), 'tokenowner', ['user_id'], unique=False)
@@ -1056,6 +1056,7 @@ class TokenOwner(MethodsMixin, db.Model):
A token can be assigned to several users.
"""
__tablename__ = 'tokenowner'
__table_args__ = {'mysql_row_format': 'DYNAMIC'}
id = db.Column(db.Integer(), Sequence("tokenowner_seq"), primary_key=True)
token_id = db.Column(db.Integer(), db.ForeignKey('token.id'))
resolver = db.Column(db.Unicode(120), default=u'', index=True)

0 comments on commit c89c545

Please sign in to comment.
You can’t perform that action at this time.