Skip to content

Commit

Permalink
pw_models: Use SQLAlchemy's LargeBinary type
Browse files Browse the repository at this point in the history
This should work under ~all usual databases.
  • Loading branch information
nbraud committed Aug 26, 2021
1 parent 9f626e6 commit 819459d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/pw_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import bcrypt
from nacl.secret import Aead
from sqlalchemy.types import LargeBinary
from sqlalchemy_utils import ChoiceType

from app.config import PW_SITE_KEY
Expand Down Expand Up @@ -123,7 +124,7 @@ def oracle(self) -> KeyedOracle:


class PasswordOracle:
pw_blob = db.Column(db.BINARY, nullable=True)
pw_blob = db.Column(LargeBinary, nullable=True)
pw_kind = db.Column(ChoiceType(PasswordKind), nullable=True)

def set_password(self, password):
Expand Down

0 comments on commit 819459d

Please sign in to comment.