Skip to content

Commit c71a9ab

Browse files
committed
fix: address review — add MySQL FK changelog entry, remove unused quotedName params
1 parent 53a9ae0 commit c71a9ab

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- Test connection success indicator not resetting after field changes
2727
- SSH port field accepting invalid values
2828
- DROP TABLE and TRUNCATE TABLE sidebar operations producing no SQL for plugin-based drivers
29+
- Foreign key navigation arrows not appearing after switching databases with Cmd+K on MySQL
2930

3031
## [0.19.1] - 2026-03-16
3132

TablePro/Views/Main/Extensions/MainContentCoordinator+TableOperations.swift

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ extension MainContentCoordinator {
3232
) -> [String] {
3333
var statements: [String] = []
3434
let dbType = connection.type
35-
let driver = DatabaseManager.shared.driver(for: connectionId)
36-
let quote: (String) -> String = driver?.quoteIdentifier
37-
?? quoteIdentifierFromDialect(PluginManager.shared.sqlDialect(for: dbType))
3835

3936
// Sort tables for consistent execution order
4037
let sortedTruncates = truncates.sorted()
@@ -50,10 +47,9 @@ extension MainContentCoordinator {
5047
}
5148

5249
for tableName in sortedTruncates {
53-
let quotedName = quote(tableName)
5450
let tableOptions = options[tableName] ?? TableOperationOptions()
5551
statements.append(contentsOf: truncateStatements(
56-
tableName: tableName, quotedName: quotedName, options: tableOptions, dbType: dbType
52+
tableName: tableName, options: tableOptions
5753
))
5854
}
5955

@@ -63,11 +59,10 @@ extension MainContentCoordinator {
6359
}()
6460

6561
for tableName in sortedDeletes {
66-
let quotedName = quote(tableName)
6762
let tableOptions = options[tableName] ?? TableOperationOptions()
6863
let stmt = dropTableStatement(
69-
tableName: tableName, quotedName: quotedName,
70-
isView: viewNames.contains(tableName), options: tableOptions, dbType: dbType
64+
tableName: tableName,
65+
isView: viewNames.contains(tableName), options: tableOptions
7166
)
7267
if !stmt.isEmpty {
7368
statements.append(stmt)
@@ -103,7 +98,7 @@ extension MainContentCoordinator {
10398
// MARK: - Private SQL Builders
10499

105100
private func truncateStatements(
106-
tableName: String, quotedName: String, options: TableOperationOptions, dbType: DatabaseType
101+
tableName: String, options: TableOperationOptions
107102
) -> [String] {
108103
guard let adapter = currentPluginDriverAdapter else { return [] }
109104
return adapter.truncateTableStatements(
@@ -112,8 +107,7 @@ extension MainContentCoordinator {
112107
}
113108

114109
private func dropTableStatement(
115-
tableName: String, quotedName: String, isView: Bool,
116-
options: TableOperationOptions, dbType: DatabaseType
110+
tableName: String, isView: Bool, options: TableOperationOptions
117111
) -> String {
118112
let keyword = isView ? "VIEW" : "TABLE"
119113
guard let adapter = currentPluginDriverAdapter else { return "" }

0 commit comments

Comments
 (0)