From 1a463b1bb466cb19ff1dbaf4e75871b78cfdc446 Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Wed, 17 Apr 2024 19:18:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9Aconfig=E8=A1=A8=E7=9A=84value?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/database/models/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/bisheng/database/models/config.py b/src/backend/bisheng/database/models/config.py index bd2893a17..fba7ff76f 100644 --- a/src/backend/bisheng/database/models/config.py +++ b/src/backend/bisheng/database/models/config.py @@ -2,13 +2,13 @@ from typing import Optional from bisheng.database.models.base import SQLModelSerializable -from sqlalchemy import Column, DateTime, String, text +from sqlalchemy import Column, DateTime, String, text, TEXT from sqlmodel import Field class ConfigBase(SQLModelSerializable): key: str = Field(index=True, unique=True) - value: str = Field(sa_column=Column(String(length=8096))) + value: str = Field(sa_column=Column(TEXT)) comment: Optional[str] = Field(index=False) create_time: Optional[datetime] = Field(sa_column=Column( DateTime, nullable=False, index=True, server_default=text('CURRENT_TIMESTAMP'))) From 7acbb2503c6d924b0bb6be01b9acdf8894d833b5 Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Wed, 17 Apr 2024 19:21:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9Aconfig=E8=A1=A8=E7=9A=84value?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/database/models/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/bisheng/database/models/config.py b/src/backend/bisheng/database/models/config.py index fba7ff76f..dcb4c05e2 100644 --- a/src/backend/bisheng/database/models/config.py +++ b/src/backend/bisheng/database/models/config.py @@ -2,13 +2,13 @@ from typing import Optional from bisheng.database.models.base import SQLModelSerializable -from sqlalchemy import Column, DateTime, String, text, TEXT +from sqlalchemy import Column, DateTime, String, text, Text from sqlmodel import Field class ConfigBase(SQLModelSerializable): key: str = Field(index=True, unique=True) - value: str = Field(sa_column=Column(TEXT)) + value: str = Field(sa_column=Column(Text)) comment: Optional[str] = Field(index=False) create_time: Optional[datetime] = Field(sa_column=Column( DateTime, nullable=False, index=True, server_default=text('CURRENT_TIMESTAMP')))