🚨 auto fix by pre-commit hooks
Ruff Lint / Ruff Lint (push) Canceled after 0s
Sequential Lint and Type Check / ruff-call (push) Canceled after 0s
Sequential Lint and Type Check / pyright-call (push) Canceled after 0s

This commit is contained in:
pre-commit-ci[bot]
2026-09-07 17:04:13 +00:00
parent 6ba511f4d6
commit 881ec1819e
8 changed files with 22 additions and 24 deletions
+1 -3
View File
@@ -339,9 +339,7 @@ def _index_sql(table: str, columns: tuple[str, ...], dialect: Dialect) -> str |
index_sql = _quote_identifier(_index_name(table, columns), dialect)
columns_sql = ", ".join(_quote_identifier(column, dialect) for column in columns)
if dialect in {"sqlite", "postgres"}:
return (
f"CREATE INDEX IF NOT EXISTS {index_sql} " f"ON {table_sql}({columns_sql})"
)
return f"CREATE INDEX IF NOT EXISTS {index_sql} ON {table_sql}({columns_sql})"
if dialect == "mysql":
return f"CREATE INDEX {index_sql} ON {table_sql}({columns_sql})"
return None