modified: backend/src/controllers/databaseManagementController.ts
modified: backend/src/controllers/schemaController.ts modified: frontend/src/pages/DatabaseSchema.tsx
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
} from '@xyflow/react';
|
||||
import '@xyflow/react/dist/style.css';
|
||||
import Dagre from '@dagrejs/dagre';
|
||||
import { Database as DatabaseIcon, RefreshCw, Loader2, Key, Link } from 'lucide-react';
|
||||
import { Database as DatabaseIcon, Loader2, Key, Link, RefreshCw } from 'lucide-react';
|
||||
import { databasesApi, schemaApi, TableInfo, SchemaData } from '@/services/api';
|
||||
import { Database } from '@/types';
|
||||
|
||||
@@ -40,7 +40,7 @@ function TableNode({ data }: { data: TableInfo & Record<string, unknown> }) {
|
||||
{data.columns.map((col) => (
|
||||
<div
|
||||
key={col.name}
|
||||
className="px-3 py-1.5 text-xs flex items-center gap-2 hover:bg-gray-50 cursor-default group relative"
|
||||
className="px-3 py-1.5 text-xs flex items-center gap-2 hover:bg-gray-50 cursor-default"
|
||||
title={col.comment || undefined}
|
||||
>
|
||||
<div className="flex items-center gap-1 flex-shrink-0">
|
||||
@@ -54,15 +54,6 @@ function TableNode({ data }: { data: TableInfo & Record<string, unknown> }) {
|
||||
</span>
|
||||
<span className="text-gray-400 truncate flex-1 text-right">{col.type}</span>
|
||||
{!col.nullable && <span className="text-red-400 text-[10px] flex-shrink-0">NN</span>}
|
||||
|
||||
{/* Tooltip for column comment */}
|
||||
{col.comment && (
|
||||
<div className="absolute left-full ml-2 top-0 z-50 hidden group-hover:block">
|
||||
<div className="bg-gray-900 text-white text-xs rounded px-2 py-1 max-w-64 whitespace-normal shadow-lg">
|
||||
{col.comment}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
{data.columns.length === 0 && (
|
||||
|
||||
Reference in New Issue
Block a user