Skip to content

Commit ecdf0d0

Browse files
committed
fix(db2): remove TABLE/VIEW from SUPPORTED_DROP_CASCADE_OBJECT_KINDS to prevent SQL0104N
1 parent 07796c2 commit ecdf0d0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • sqlmesh/core/engine_adapter

sqlmesh/core/engine_adapter/db2.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ class Db2EngineAdapter(
5252
COMMENT_CREATION_TABLE = CommentCreationTable.COMMENT_COMMAND_ONLY
5353
COMMENT_CREATION_VIEW = CommentCreationView.COMMENT_COMMAND_ONLY
5454
SUPPORTS_QUERY_EXECUTION_TRACKING = True
55-
SUPPORTED_DROP_CASCADE_OBJECT_KINDS = ["SCHEMA", "TABLE", "VIEW"]
55+
# Db2 does not support DROP TABLE/VIEW ... CASCADE — doing so raises SQL0104N.
56+
# Schema cascade is handled manually inside drop_schema() and does not rely
57+
# on this flag, so the list is intentionally empty.
58+
# SUPPORTED_DROP_CASCADE_OBJECT_KINDS = ["SCHEMA", "TABLE", "VIEW"]
59+
SUPPORTED_DROP_CASCADE_OBJECT_KINDS: t.List[str] = []
5660
MAX_IDENTIFIER_LENGTH: t.Optional[int] = 128
5761
SCHEMA_DIFFER_KWARGS = {
5862
"parameterized_type_defaults": {

0 commit comments

Comments
 (0)