faeddc365c
* Recovery codes can only be shown after adding a 2FA code and cannot be seen afterwards * Added recovery codes fix * Updated models and script * Formatting * Format * Added base code * Updated wording * Set the config by default Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
30 lines
739 B
Python
30 lines
739 B
Python
"""Updated recovery code string length
|
|
|
|
Revision ID: bd95b2b4217f
|
|
Revises: 9cc0f0712b29
|
|
Create Date: 2022-09-27 16:14:35.021846
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'bd95b2b4217f'
|
|
down_revision = '9cc0f0712b29'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.execute('ALTER TABLE recovery_code ALTER COLUMN code TYPE VARCHAR(64)')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.execute('ALTER TABLE recovery_code ALTER COLUMN code TYPE VARCHAR(16)')
|
|
# ### end Alembic commands ###
|