mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Add simple api package including authentication (BasicAuth and TokenAuth)
This commit is contained in:
32
migrations/versions/c384d7b3268a_.py
Normal file
32
migrations/versions/c384d7b3268a_.py
Normal file
@ -0,0 +1,32 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: c384d7b3268a
|
||||
Revises: 55d2b1a82ba9
|
||||
Create Date: 2021-09-14 09:11:45.409350
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'c384d7b3268a'
|
||||
down_revision = '55d2b1a82ba9'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('token', sa.String(length=32), nullable=True))
|
||||
op.add_column('users', sa.Column('token_expiration', sa.DateTime(), nullable=True))
|
||||
op.create_index(op.f('ix_users_token'), 'users', ['token'], unique=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_users_token'), table_name='users')
|
||||
op.drop_column('users', 'token_expiration')
|
||||
op.drop_column('users', 'token')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user