Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat: add alterPrimaryKey capability flag to frontend

t8y2479f4623dbd1
diff --git a/apps/desktop/src/lib/tableStructureCapabilities.ts b/apps/desktop/src/lib/tableStructureCapabilities.ts
index c6b974f9ce..735a8f39b5 100644
--- a/apps/desktop/src/lib/tableStructureCapabilities.ts
+++ b/apps/desktop/src/lib/tableStructureCapabilities.ts
@@ -21,6 +21,7 @@ export interface TableStructureCapabilities {
alterType: boolean;
alterNullability: boolean;
alterDefault: boolean;
+ alterPrimaryKey: boolean;
reorderColumn: boolean;
comment: boolean;
createIndex: boolean;
@@ -42,6 +43,7 @@ const unsupportedCapabilities: TableStructureCapabilities = {
alterType: false,
alterNullability: false,
alterDefault: false,
+ alterPrimaryKey: false,
reorderColumn: false,
comment: false,
createIndex: false,
@@ -73,6 +75,7 @@ const mysqlCapabilities = capabilities({
dropIndex: true,
rebuildIndex: true,
indexType: true,
+ alterPrimaryKey: true,
});
const postgresCapabilities = capabilities({
@@ -93,6 +96,7 @@ const postgresCapabilities = capabilities({
indexInclude: true,
indexFilter: true,
indexComment: true,
+ alterPrimaryKey: true,
});
const redshiftCapabilities = capabilities({
@@ -104,6 +108,7 @@ const redshiftCapabilities = capabilities({
indexInclude: false,
indexFilter: false,
indexComment: false,
+ alterPrimaryKey: false,
});
const sqliteCapabilities = capabilities({