diff options
author | B. Stack <bgstack15@gmail.com> | 2023-06-16 21:16:22 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-06-24 08:24:26 -0400 |
commit | 159cd6781e75c48c121ff703f895330d51dd23a1 (patch) | |
tree | 55aaeb2e9db9dfc26879c4300fb0139699b570a9 | |
parent | WIP: initial ldap support (diff) | |
download | newspipe-159cd6781e75c48c121ff703f895330d51dd23a1.tar.gz newspipe-159cd6781e75c48c121ff703f895330d51dd23a1.tar.bz2 newspipe-159cd6781e75c48c121ff703f895330d51dd23a1.zip |
WIP: add db string user.external_auth
-rw-r--r-- | migrations/versions/2a5604bed382_add_string_user_external_auth.py | 24 | ||||
-rw-r--r-- | newspipe/models/user.py | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/migrations/versions/2a5604bed382_add_string_user_external_auth.py b/migrations/versions/2a5604bed382_add_string_user_external_auth.py new file mode 100644 index 00000000..ee284a1d --- /dev/null +++ b/migrations/versions/2a5604bed382_add_string_user_external_auth.py @@ -0,0 +1,24 @@ +"""add_string_user_external_auth + +Revision ID: 2a5604bed382 +Revises: bdd38bd755cb +Create Date: 2023-06-17 15:30:40.434393 + +""" + +# revision identifiers, used by Alembic. +revision = '2a5604bed382' +down_revision = 'bdd38bd755cb' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.add_column('user', sa.Column('external_auth', sa.String(), nullable=True)) + + +def downgrade(): + op.drop_column('user', 'external_auth') diff --git a/newspipe/models/user.py b/newspipe/models/user.py index b095fdf1..72c35afc 100644 --- a/newspipe/models/user.py +++ b/newspipe/models/user.py @@ -46,6 +46,7 @@ class User(db.Model, UserMixin, RightMixin): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(), unique=True) pwdhash = db.Column(db.String()) + external_auth = db.Column(db.String(), default="", nullable=True) automatic_crawling = db.Column(db.Boolean(), default=True) |