From bd7d8e439804af44705e30b05e1beecb7244c00b Mon Sep 17 00:00:00 2001 From: tuxcoder Date: Mon, 25 Dec 2023 18:57:27 +0100 Subject: [PATCH] fix postfix compatiblity sql is only a standard, ... --- lenticular_cloud/migrations/versions/b5448df204eb_passkey.py | 4 ++-- lenticular_cloud/model.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lenticular_cloud/migrations/versions/b5448df204eb_passkey.py b/lenticular_cloud/migrations/versions/b5448df204eb_passkey.py index e7ff0ad..51a484e 100644 --- a/lenticular_cloud/migrations/versions/b5448df204eb_passkey.py +++ b/lenticular_cloud/migrations/versions/b5448df204eb_passkey.py @@ -21,8 +21,8 @@ def upgrade(): op.create_table('passkey_credential', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('user_id', sa.Uuid(), nullable=False), - sa.Column('credential_id', sa.BINARY(), nullable=False), - sa.Column('credential_public_key', sa.BINARY(), nullable=False), + sa.Column('credential_id', sa.LargeBinary(), nullable=False), + sa.Column('credential_public_key', sa.LargeBinary(), nullable=False), sa.Column('name', sa.String(length=250), nullable=False), sa.Column('last_used', sa.DateTime(), nullable=True), sa.Column('sign_count', sa.Integer(), nullable=False), diff --git a/lenticular_cloud/model.py b/lenticular_cloud/model.py index 9da828f..799ce2d 100644 --- a/lenticular_cloud/model.py +++ b/lenticular_cloud/model.py @@ -247,8 +247,8 @@ class PasskeyCredential(BaseModel, ModelUpdatedMixin): # pylint: disable=too-fe id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) user_id: Mapped[uuid.UUID] = mapped_column(db.Uuid, db.ForeignKey('user.id', ondelete='CASCADE'), nullable=False) - credential_id: Mapped[bytes] = mapped_column(db.BINARY, nullable=False) - credential_public_key: Mapped[bytes] = mapped_column(db.BINARY, nullable=False) + credential_id: Mapped[bytes] = mapped_column(db.LargeBinary, nullable=False) + credential_public_key: Mapped[bytes] = mapped_column(db.LargeBinary, nullable=False) name: Mapped[str] = mapped_column(db.String(250), nullable=False) last_used: Mapped[Optional[datetime]] = mapped_column(db.DateTime, nullable=True, default=None) sign_count: Mapped[int] = mapped_column(db.Integer, nullable=False, default=0)