From c4af1cbca70b6de3b098872e884e02775a8b851d Mon Sep 17 00:00:00 2001 From: Joe Li Date: Wed, 25 Mar 2026 01:24:53 -0700 Subject: [PATCH] fix(models): correct TabState.latest_query_id column type to match FK target (#38837) Co-authored-by: Claude Opus 4.6 (cherry picked from commit 4b26f8c712bb10a2a6292f846b232ada1b2eb705) --- superset/models/sql_lab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index 7a6b246990d..7d303ffa99a 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -540,7 +540,7 @@ class TabState(AuditMixinNullable, ExtraJSONMixin, Model): # latest query that was run latest_query_id = Column( - Integer, ForeignKey("query.client_id", ondelete="SET NULL") + String(11), ForeignKey("query.client_id", ondelete="SET NULL") ) latest_query = relationship("Query")