minor fix: fix default for status of TidbAuthBinding in compatible with various versions (#22288)

This commit is contained in:
NeatGuyCoding
2025-08-01 14:51:16 +08:00
committed by GitHub
parent 05b002a8b7
commit 759ded3e3a
9 changed files with 28 additions and 11 deletions

View File

@@ -970,7 +970,7 @@ class TidbAuthBinding(Base):
cluster_id: Mapped[str] = mapped_column(String(255), nullable=False)
cluster_name: Mapped[str] = mapped_column(String(255), nullable=False)
active: Mapped[bool] = mapped_column(db.Boolean, nullable=False, server_default=db.text("false"))
status = mapped_column(String(255), nullable=False, server_default=db.text("CREATING"))
status = mapped_column(String(255), nullable=False, server_default=db.text("'CREATING'::character varying"))
account: Mapped[str] = mapped_column(String(255), nullable=False)
password: Mapped[str] = mapped_column(String(255), nullable=False)
created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, server_default=func.current_timestamp())