app-MAIL-temp/migrations/versions/2022_092716_bd95b2b4217f_updated_recovery_code_string_length.py
Adrià Casajús faeddc365c
Display recovery codes for mfa only once (#1317)
* 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>
2022-10-03 12:32:45 +02:00

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 ###