mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
add oauth client description
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
"""client-description
|
||||||
|
|
||||||
|
Revision ID: d68c98b66cd4
|
||||||
|
Revises: 99a28a4418e1
|
||||||
|
Create Date: 2018-04-13 10:50:17.968636
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'd68c98b66cd4'
|
||||||
|
down_revision = '99a28a4418e1'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
tables = op.get_bind().engine.table_names()
|
||||||
|
if 'oauth_clients' in tables:
|
||||||
|
op.add_column(
|
||||||
|
'oauth_clients',
|
||||||
|
sa.Column('description', sa.Unicode(length=1023))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_column('oauth_clients', 'description')
|
@@ -486,6 +486,7 @@ class OAuthClient(Base):
|
|||||||
__tablename__ = 'oauth_clients'
|
__tablename__ = 'oauth_clients'
|
||||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
identifier = Column(Unicode(255), unique=True)
|
identifier = Column(Unicode(255), unique=True)
|
||||||
|
description = Column(Unicode(1023))
|
||||||
secret = Column(Unicode(255))
|
secret = Column(Unicode(255))
|
||||||
redirect_uri = Column(Unicode(1023))
|
redirect_uri = Column(Unicode(1023))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user