-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for longer scrypt password hashes
- Loading branch information
1 parent
8b0b56f
commit ed1cd1c
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
migrations/versions/5adf634a5e8b_make_password_hash_longer_to_work_with_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
"""make password hash longer to work with scrypt | ||
Revision ID: 5adf634a5e8b | ||
Revises: c83a60d7583b | ||
Create Date: 2023-11-11 16:03:57.838344 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '5adf634a5e8b' | ||
down_revision = 'c83a60d7583b' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(engine_name: str) -> None: | ||
globals()["upgrade_%s" % engine_name]() | ||
|
||
|
||
def downgrade(engine_name: str) -> None: | ||
globals()["downgrade_%s" % engine_name]() | ||
|
||
|
||
|
||
|
||
|
||
def upgrade_() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('users', schema=None) as batch_op: | ||
batch_op.alter_column('password_hash', | ||
existing_type=sa.VARCHAR(length=128), | ||
type_=sa.String(length=256), | ||
existing_nullable=True) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade_() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('users', schema=None) as batch_op: | ||
batch_op.alter_column('password_hash', | ||
existing_type=sa.String(length=256), | ||
type_=sa.VARCHAR(length=128), | ||
existing_nullable=True) | ||
|
||
# ### end Alembic commands ### | ||
|