mirror of
https://github.com/supabase/supabase.git
synced 2026-06-15 08:05:21 +08:00
## Problem When using LLMs, it's useful to describe your tables in markdown format. ## Solution - Add an _Copy as SQL_ and _Copy as Markdown_ in the schema visualiser table menu <img width="320" height="235" alt="image" src="https://github.com/user-attachments/assets/b465d6aa-a011-4308-86de-78725328630b" /> - Refactor the _Copy as SQL_ and _Download current view_ buttons in a single button/dropdown combo and add _Copy as markdown_: <img width="333" height="143" alt="image" src="https://github.com/user-attachments/assets/a823988b-abff-4840-b5a5-53a5830065b4" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * "Copy as Markdown" for schemas and individual tables. * "Copy as SQL" for individual tables. * Per-column descriptions included in schema/table exports. * **Style** * Export actions consolidated into a compact, grouped dropdown with adjacent copy action for streamlined header controls. * **Tests** * Unit tests for markdown export helpers. * E2E tests updated to use the new export UI and adjusted dialog timing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
28 lines
500 B
TypeScript
28 lines
500 B
TypeScript
export type TableNodeData = {
|
|
id: number
|
|
schema: string
|
|
name: string
|
|
ref?: string
|
|
isForeign: boolean
|
|
description: string
|
|
columns: {
|
|
id: string
|
|
isPrimary: boolean
|
|
isNullable: boolean
|
|
isUnique: boolean
|
|
isIdentity: boolean
|
|
name: string
|
|
format: string
|
|
description: string
|
|
}[]
|
|
}
|
|
|
|
export type EdgeData = {
|
|
sourceName: string
|
|
sourceSchemaName: string
|
|
sourceColumnName: string
|
|
targetName: string
|
|
targetSchemaName: string
|
|
targetColumnName: string
|
|
}
|