mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
fix: SQLAlchemy deprecation warnings for default parameter (#33980)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
This commit is contained in:
parent
ca703fdda1
commit
e873cea99e
@ -589,7 +589,9 @@ class AppModelConfig(TypeBase):
|
|||||||
__tablename__ = "app_model_configs"
|
__tablename__ = "app_model_configs"
|
||||||
__table_args__ = (sa.PrimaryKeyConstraint("id", name="app_model_config_pkey"), sa.Index("app_app_id_idx", "app_id"))
|
__table_args__ = (sa.PrimaryKeyConstraint("id", name="app_model_config_pkey"), sa.Index("app_app_id_idx", "app_id"))
|
||||||
|
|
||||||
id: Mapped[str] = mapped_column(StringUUID, default=lambda: str(uuid4()), init=False)
|
id: Mapped[str] = mapped_column(
|
||||||
|
StringUUID, insert_default=lambda: str(uuid4()), default_factory=lambda: str(uuid4()), init=False
|
||||||
|
)
|
||||||
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
|
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
|
||||||
provider: Mapped[str | None] = mapped_column(String(255), nullable=True, default=None)
|
provider: Mapped[str | None] = mapped_column(String(255), nullable=True, default=None)
|
||||||
model_id: Mapped[str | None] = mapped_column(String(255), nullable=True, default=None)
|
model_id: Mapped[str | None] = mapped_column(String(255), nullable=True, default=None)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user