Skip to content

Commit b87e6e8

Browse files
refactor: use split_full_table_name() in create_index_ddl
Replace the last ad-hoc name split in the codebase: full_table_name.split(".")[-1].strip('`"') -> split_full_table_name() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent df908b7 commit b87e6e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datajoint/adapters/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def create_index_ddl(
647647
# Generate index name from table and columns if not provided
648648
if index_name is None:
649649
# Extract table name from full_table_name for index naming
650-
table_part = full_table_name.split(".")[-1].strip('`"')
650+
_, table_part = self.split_full_table_name(full_table_name)
651651
col_part = "_".join(columns)[:30] # Truncate for long column lists
652652
index_name = f"idx_{table_part}_{col_part}"
653653
unique_clause = "UNIQUE " if unique else ""

0 commit comments

Comments
 (0)