before Deepseek fix
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
"""Add mfa_state to api_tokens
|
||||||
|
|
||||||
|
Revision ID: 299d39b0f13d
|
||||||
|
Revises: 792840bbb2e0
|
||||||
|
Create Date: 2025-12-23 14:28:44.223847
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '299d39b0f13d'
|
||||||
|
down_revision = '792840bbb2e0'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.add_column('api_tokens', sa.Column('mfa_state', sa.String(), nullable=True))
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_column('api_tokens', 'mfa_state')
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
"""Allow null tokens and expiry during MFA
|
||||||
|
|
||||||
|
Revision ID: 792840bbb2e0
|
||||||
|
Revises: ce0f0282a142
|
||||||
|
Create Date: 2025-12-23 14:19:15.592078
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '792840bbb2e0'
|
||||||
|
down_revision = 'ce0f0282a142'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.alter_column('api_tokens', 'access_token',
|
||||||
|
existing_type=sa.VARCHAR(),
|
||||||
|
nullable=True)
|
||||||
|
op.alter_column('api_tokens', 'expires_at',
|
||||||
|
existing_type=sa.DATETIME(),
|
||||||
|
nullable=True)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.alter_column('api_tokens', 'expires_at',
|
||||||
|
existing_type=sa.DATETIME(),
|
||||||
|
nullable=False)
|
||||||
|
op.alter_column('api_tokens', 'access_token',
|
||||||
|
existing_type=sa.VARCHAR(),
|
||||||
|
nullable=False)
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user