Compare commits
No commits in common. "373623b0b40130f81adf1e11660875ad2a35a343" and "4ee7f0a6096e74c71342bd3d28fa8c7f299cbb91" have entirely different histories.
373623b0b4
...
4ee7f0a609
@ -8,10 +8,10 @@ class MasterPass(sqlmodel.SQLModel, table=True):
|
|||||||
id: Optional[int] = sqlmodel.Field(primary_key=True)
|
id: Optional[int] = sqlmodel.Field(primary_key=True)
|
||||||
user_id: int = sqlmodel.Field(nullable=False, index=True, unique=True)
|
user_id: int = sqlmodel.Field(nullable=False, index=True, unique=True)
|
||||||
salt: bytes = sqlmodel.Field(
|
salt: bytes = sqlmodel.Field(
|
||||||
sa_column=sqlmodel.Column(sqlmodel.VARBINARY(255), nullable=False)
|
sa_column=sqlmodel.Column(type_=sqlmodel.VARBINARY(255), nullable=False)
|
||||||
)
|
)
|
||||||
passwd: bytes = sqlmodel.Field(
|
passwd: bytes = sqlmodel.Field(
|
||||||
sa_column=sqlmodel.Column(sqlmodel.VARBINARY(255), nullable=False)
|
sa_column=sqlmodel.Column(type_=sqlmodel.VARBINARY(255), nullable=False)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -22,11 +22,11 @@ class Account(sqlmodel.SQLModel, table=True):
|
|||||||
user_id: int = sqlmodel.Field(nullable=False, index=True)
|
user_id: int = sqlmodel.Field(nullable=False, index=True)
|
||||||
name: str = sqlmodel.Field(nullable=False, index=True, max_length=255)
|
name: str = sqlmodel.Field(nullable=False, index=True, max_length=255)
|
||||||
salt: bytes = sqlmodel.Field(
|
salt: bytes = sqlmodel.Field(
|
||||||
sa_column=sqlmodel.Column(sqlmodel.VARBINARY(255), nullable=False)
|
sa_column=sqlmodel.Column(type_=sqlmodel.VARBINARY(255), nullable=False)
|
||||||
)
|
)
|
||||||
enc_login: bytes = sqlmodel.Field(
|
enc_login: bytes = sqlmodel.Field(
|
||||||
sa_column=sqlmodel.Column(sqlmodel.VARBINARY(255), nullable=False)
|
sa_column=sqlmodel.Column(type_=sqlmodel.VARBINARY(255), nullable=False)
|
||||||
)
|
)
|
||||||
enc_pass: bytes = sqlmodel.Field(
|
enc_pass: bytes = sqlmodel.Field(
|
||||||
sa_column=sqlmodel.Column(sqlmodel.VARBINARY(255), nullable=False)
|
sa_column=sqlmodel.Column(type_=sqlmodel.VARBINARY(255), nullable=False)
|
||||||
)
|
)
|
||||||
|
@ -12,4 +12,7 @@ def get_engine(host: str, user: str, passwd: str, db: str) -> Engine:
|
|||||||
|
|
||||||
|
|
||||||
def prepare(engine: Engine) -> None:
|
def prepare(engine: Engine) -> None:
|
||||||
sqlmodel.SQLModel.metadata.create_all(engine)
|
sqlmodel.SQLModel.metadata.create_all(
|
||||||
|
engine,
|
||||||
|
# [models.Account, models.MasterPass]
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user