Skip to content

Commit d708754

Browse files
committed
release: v0.27.1
1 parent 81070de commit d708754

8 files changed

Lines changed: 37 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.27.1] - 2026-04-01
11+
12+
### Fixed
13+
14+
- Table queries incorrectly prefixed with connection username as schema name on non-schema databases (MySQL, MariaDB, ClickHouse, Redis, etc.), causing "Table 'username.table' doesn't exist" errors when opening a second table tab
15+
1016
## [0.27.0] - 2026-03-31
1117

1218
### Added
@@ -1118,7 +1124,8 @@ TablePro is a native macOS database client built with SwiftUI and AppKit, design
11181124
- Custom SQL query templates
11191125
- Performance optimized for large datasets
11201126

1121-
[Unreleased]: https://github.com/TableProApp/TablePro/compare/v0.27.0...HEAD
1127+
[Unreleased]: https://github.com/TableProApp/TablePro/compare/v0.27.1...HEAD
1128+
[0.27.1]: https://github.com/TableProApp/TablePro/compare/v0.27.0...v0.27.1
11221129
[0.27.0]: https://github.com/TableProApp/TablePro/compare/v0.26.0...v0.27.0
11231130
[0.26.0]: https://github.com/TableProApp/TablePro/compare/v0.25.0...v0.26.0
11241131
[0.25.0]: https://github.com/TableProApp/TablePro/compare/v0.24.2...v0.25.0

TablePro.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@
20932093
CODE_SIGN_IDENTITY = "Apple Development";
20942094
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
20952095
CODE_SIGN_STYLE = Automatic;
2096-
CURRENT_PROJECT_VERSION = 53;
2096+
CURRENT_PROJECT_VERSION = 54;
20972097
DEAD_CODE_STRIPPING = YES;
20982098
DEVELOPMENT_TEAM = D7HJ5TFYCU;
20992099
ENABLE_APP_SANDBOX = NO;
@@ -2118,7 +2118,7 @@
21182118
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
21192119
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
21202120
MACOSX_DEPLOYMENT_TARGET = 14.0;
2121-
MARKETING_VERSION = 0.27.0;
2121+
MARKETING_VERSION = 0.27.1;
21222122
OTHER_LDFLAGS = (
21232123
"-Wl,-w",
21242124
"-force_load",
@@ -2165,7 +2165,7 @@
21652165
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
21662166
CODE_SIGN_STYLE = Automatic;
21672167
COPY_PHASE_STRIP = YES;
2168-
CURRENT_PROJECT_VERSION = 53;
2168+
CURRENT_PROJECT_VERSION = 54;
21692169
DEAD_CODE_STRIPPING = YES;
21702170
DEPLOYMENT_POSTPROCESSING = YES;
21712171
DEVELOPMENT_TEAM = D7HJ5TFYCU;
@@ -2191,7 +2191,7 @@
21912191
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
21922192
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
21932193
MACOSX_DEPLOYMENT_TARGET = 14.0;
2194-
MARKETING_VERSION = 0.27.0;
2194+
MARKETING_VERSION = 0.27.1;
21952195
OTHER_LDFLAGS = (
21962196
"-Wl,-w",
21972197
"-force_load",

TablePro/Core/Database/DatabaseDriver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ protocol DatabaseDriver: AnyObject {
160160
/// Protocol for drivers that support schema/search_path switching.
161161
/// Eliminates repeated as? casting chains in DatabaseManager.
162162
protocol SchemaSwitchable: DatabaseDriver {
163-
var currentSchema: String { get }
164-
var escapedSchema: String { get }
163+
var currentSchema: String? { get }
164+
var escapedSchema: String? { get }
165165
func switchSchema(to schema: String) async throws
166166
}
167167

TablePro/Core/Database/DatabaseManager.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,9 @@ final class DatabaseManager {
10161016
// Query the actual constraint name from pg_constraint
10171017
let escapedTable = tableName.replacingOccurrences(of: "'", with: "''")
10181018
let schema: String
1019-
if let schemaDriver = driver as? SchemaSwitchable {
1020-
schema = schemaDriver.escapedSchema
1019+
if let schemaDriver = driver as? SchemaSwitchable,
1020+
let escaped = schemaDriver.escapedSchema {
1021+
schema = escaped
10211022
} else {
10221023
schema = "public"
10231024
}

TablePro/Core/Plugins/PluginDriverAdapter.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ final class PluginDriverAdapter: DatabaseDriver, SchemaSwitchable {
4747
}
4848
return pluginDriver
4949
}
50-
var currentSchema: String { pluginDriver.currentSchema ?? connection.username }
51-
var escapedSchema: String { pluginDriver.escapeStringLiteral(currentSchema) }
50+
var currentSchema: String? {
51+
guard pluginDriver.supportsSchemas else { return nil }
52+
return pluginDriver.currentSchema
53+
}
54+
55+
var escapedSchema: String? {
56+
guard let schema = currentSchema else { return nil }
57+
return pluginDriver.escapeStringLiteral(schema)
58+
}
5259

5360
private static let logger = Logger(subsystem: "com.TablePro", category: "PluginDriverAdapter")
5461

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,9 @@ extension MainContentCoordinator {
305305
}
306306

307307
private func currentSchemaName(fallback: String) -> String {
308-
if let schemaDriver = DatabaseManager.shared.driver(for: connectionId) as? SchemaSwitchable {
309-
return schemaDriver.escapedSchema
308+
if let schemaDriver = DatabaseManager.shared.driver(for: connectionId) as? SchemaSwitchable,
309+
let schema = schemaDriver.escapedSchema {
310+
return schema
310311
}
311312
return fallback
312313
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ extension MainContentCoordinator {
435435
/// switches the driver's search_path so the restored tab's query succeeds.
436436
func restoreSchemaAndRunQuery(_ schema: String) async {
437437
guard let driver = DatabaseManager.shared.driver(for: connectionId),
438-
let schemaDriver = driver as? SchemaSwitchable else {
438+
let schemaDriver = driver as? SchemaSwitchable,
439+
schemaDriver.currentSchema != nil else {
439440
runQuery()
440441
return
441442
}

docs/changelog.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ description: "Product updates and announcements for TablePro"
44
rss: true
55
---
66

7+
<Update label="April 1, 2026" description="v0.27.1">
8+
### Bug Fixes
9+
10+
- Fixed table queries being incorrectly prefixed with the connection username as a schema name on non-schema databases (MySQL, MariaDB, ClickHouse, Redis, etc.), causing "Table 'username.table' doesn't exist" errors when opening a second table tab
11+
</Update>
12+
713
<Update label="March 31, 2026" description="v0.27.0">
814
### New Features
915

0 commit comments

Comments
 (0)