From 4c702b6260f6c9c69b02f64fe775fffed4878783 Mon Sep 17 00:00:00 2001 From: Noloquideus Date: Wed, 13 May 2026 11:18:21 +0300 Subject: [PATCH] feat: add new column and delete old --- src/application/domain/entities/user.py | 2 +- src/infrastructure/cache/keydb_client.py | 2 +- src/infrastructure/cache/remote_cache.py | 2 +- src/infrastructure/database/models/user.py | 4 ++-- src/infrastructure/database/repositories/user_repository.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/application/domain/entities/user.py b/src/application/domain/entities/user.py index b7c2634..5247505 100644 --- a/src/application/domain/entities/user.py +++ b/src/application/domain/entities/user.py @@ -14,7 +14,7 @@ class UserEntity: last_name: str | None = None birth_date: date | None = None - crypto_wallet: str | None = None + encrypted_mnemonic: str | None = None phone: str | None = None passport_data: str | None = None diff --git a/src/infrastructure/cache/keydb_client.py b/src/infrastructure/cache/keydb_client.py index 56a3ca1..b5f0e85 100644 --- a/src/infrastructure/cache/keydb_client.py +++ b/src/infrastructure/cache/keydb_client.py @@ -40,7 +40,7 @@ class KeydbCache(ICache): 'middle_name': user.middle_name, 'last_name': user.last_name, 'birth_date': str(user.birth_date) if user.birth_date else None, - 'crypto_wallet': user.crypto_wallet, + 'encrypted_mnemonic': user.encrypted_mnemonic, 'phone': user.phone, 'passport_data': user.passport_data, 'inn': user.inn, diff --git a/src/infrastructure/cache/remote_cache.py b/src/infrastructure/cache/remote_cache.py index 38cc508..b37ff98 100644 --- a/src/infrastructure/cache/remote_cache.py +++ b/src/infrastructure/cache/remote_cache.py @@ -53,7 +53,7 @@ class RemoteCache(ICache): 'middle_name': user.middle_name, 'last_name': user.last_name, 'birth_date': str(user.birth_date) if user.birth_date else None, - 'crypto_wallet': user.crypto_wallet, + 'encrypted_mnemonic': user.encrypted_mnemonic, 'phone': user.phone, 'passport_data': user.passport_data, 'inn': user.inn, diff --git a/src/infrastructure/database/models/user.py b/src/infrastructure/database/models/user.py index 68c2479..a9d2326 100644 --- a/src/infrastructure/database/models/user.py +++ b/src/infrastructure/database/models/user.py @@ -1,6 +1,6 @@ from __future__ import annotations -from sqlalchemy import Boolean,Date,String,DateTime +from sqlalchemy import Boolean,Date,String,DateTime,Text from sqlalchemy.orm import Mapped,mapped_column from src.infrastructure.database.models.base import Base from src.infrastructure.database.models.mixins import UlidPrimaryKeyMixin,AuditTimestampsMixin,SoftDeleteMixin @@ -17,7 +17,7 @@ class UserModel(Base, UlidPrimaryKeyMixin, AuditTimestampsMixin, SoftDeleteMixin middle_name: Mapped[str | None] = mapped_column(String(128), nullable=True) birth_date: Mapped[Date | None] = mapped_column(Date, nullable=True) - crypto_wallet: Mapped[str | None] = mapped_column(String(255), nullable=True) + encrypted_mnemonic: Mapped[str | None] = mapped_column(Text, nullable=True) phone: Mapped[str | None] = mapped_column(String(16), nullable=True) passport_data: Mapped[str | None] = mapped_column(String(255), nullable=True) diff --git a/src/infrastructure/database/repositories/user_repository.py b/src/infrastructure/database/repositories/user_repository.py index f5d716a..6d8a9cc 100644 --- a/src/infrastructure/database/repositories/user_repository.py +++ b/src/infrastructure/database/repositories/user_repository.py @@ -24,7 +24,7 @@ class UserRepository(IUserRepository): middle_name=model.middle_name, last_name=model.last_name, birth_date=model.birth_date, - crypto_wallet=model.crypto_wallet, + encrypted_mnemonic=model.encrypted_mnemonic, phone=model.phone, passport_data=model.passport_data, inn=model.inn,