mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
Add Client approved, description columns
This commit is contained in:
parent
eab4f5f7ac
commit
bbfb69d774
2 changed files with 35 additions and 0 deletions
|
@ -838,6 +838,10 @@ class Client(db.Model, ModelMixin):
|
|||
user_id = db.Column(db.ForeignKey(User.id, ondelete="cascade"), nullable=False)
|
||||
icon_id = db.Column(db.ForeignKey(File.id), nullable=True)
|
||||
|
||||
# an app needs to be approved by SimpleLogin team
|
||||
approved = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
|
||||
description = db.Column(db.Text, nullable=True)
|
||||
|
||||
icon = db.relationship(File)
|
||||
|
||||
def nb_user(self):
|
||||
|
|
31
migrations/versions/2021_040110_517b79c56088_.py
Normal file
31
migrations/versions/2021_040110_517b79c56088_.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 517b79c56088
|
||||
Revises: f398b261d9c6
|
||||
Create Date: 2021-04-01 10:49:42.682281
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '517b79c56088'
|
||||
down_revision = 'f398b261d9c6'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('client', sa.Column('approved', sa.Boolean(), server_default='0', nullable=False))
|
||||
op.add_column('client', sa.Column('description', sa.Text(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('client', 'description')
|
||||
op.drop_column('client', 'approved')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue