Skip to content

Commit d00b09e

Browse files
committed
clean up create a diagram page
1 parent 84fbc4c commit d00b09e

File tree

5 files changed

+52
-15
lines changed

5 files changed

+52
-15
lines changed

docs/create-diagram.md

+40-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import ThemedImage from '../src/components/ThemedImage'; import Flex from '../src/components/Flex'; import FAQ from '../src/components/FAQ';
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
import ThemedImage from '../src/components/ThemedImage';
6+
import Flex from '../src/components/Flex';
7+
import FAQ from '../src/components/FAQ';
28

39
# Create a diagram
410

@@ -32,15 +38,23 @@ The following databases are supported:
3238
- MariaDB
3339
- MSSQL
3440

35-
<ThemedImage lightImageSrc={require("./img/light/pick-db.png").default} darkImageSrc={require("./img/dark/pick-db.png").default} alt="Pick a database" />
41+
<ThemedImage
42+
lightImageSrc={require("./img/light/pick-db.png").default}
43+
darkImageSrc={require("./img/dark/pick-db.png").default}
44+
alt="Pick a database"
45+
/>
3646

37-
## Define tables
47+
## Tables
3848

3949
Add tables either from the sidebar or the toolbar and define columns.
4050

41-
<ThemedImage lightImageSrc={require("./img/light/define-tables.gif").default} darkImageSrc={require("./img/dark/define-tables.gif").default} alt="Define tables" />
51+
<ThemedImage
52+
lightImageSrc={require("./img/light/define-tables.gif").default}
53+
darkImageSrc={require("./img/dark/define-tables.gif").default}
54+
alt="Define tables"
55+
/>
4256

43-
### Columns
57+
### Table Fields
4458

4559
You can define the following fields for a column:
4660

@@ -54,23 +68,35 @@ You can define the following fields for a column:
5468
- Check constraint
5569
- Comment
5670

57-
:::info
71+
:::info
5872

59-
If multiple primary keys are defined a composite primary key will be generated in the SQL output.
73+
If multiple primary keys are defined a composite primary key will be generated in the SQL output.
6074

6175
:::
6276

63-
:::info
77+
:::info
6478

65-
The check constraint will be injected into the SQL output as is.
79+
The check constraint will be injected into the SQL output as is.
6680

6781
:::
6882

69-
## Create relationships
83+
### Indexes
84+
85+
You can define the following fields for an index:
86+
87+
- Fields
88+
- Unique
89+
- Name
90+
91+
## Relationships
7092

7193
To create relationships and define foreign keys, click and hold the blue dot on the foreign key column, then drag and drop it onto the primary column. This action follows the logic of `start_col REFERENCES end_col`, where the column you drag from will be designated as the foreign key, linking it to the primary key in the destination column.
7294

73-
<ThemedImage lightImageSrc={require("./img/light/create-relationship.gif").default} darkImageSrc={require("./img/dark/create-relationship.gif").default} alt="Create a relationship" />
95+
<ThemedImage
96+
lightImageSrc={require("./img/light/create-relationship.gif").default}
97+
darkImageSrc={require("./img/dark/create-relationship.gif").default}
98+
alt="Create a relationship"
99+
/>
74100

75101
E.g. in the image above, since `posts.user_id` is the foreign key we start dragging from `user_id` to `users.id`.
76102

@@ -101,11 +127,11 @@ A join table is a third table that contains foreign keys to the 2 tables you'd l
101127

102128
</FAQ>
103129

104-
## Organize with subject areas
130+
## Subject areas
105131

106132
You add subject areas from the `Subject Areas` tab in the sidebar or from the toolbar. They logically group the tables in subject areas to make it easier to navigate the diagram; they server a pure visual purpose and do not translate to any SQL logic and are not reflected in the generated scripts.
107133

108-
## Add notes
134+
## Notes
109135

110136
You add notes from the `Notes` tab in the sidebar or from the toolbar. You can use notes to capture any additional comments in the diagram.
111137

@@ -122,6 +148,6 @@ If the diagram type supports custom types there will be an additional `Types` ta
122148

123149
Upon adding a new type, it will be added to the list of types you can choose from when editing a column.
124150

125-
## Define Enums (PostgreSQL)
151+
## Enums (PostgreSQL)
126152

127153
If the diagram is for PostgreSQL there will be an additional `Enums` tab in the sidebar where you can define enum values. Upon adding a new enum, it will be added to the list of types you can choose from when editing a column.

docs/customizing-editor.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Customizing the editor

docs/how-it-works.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# How it works

docs/settings.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Settings

docs/share.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# Share the diagram
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Sharing a diagram
26

0 commit comments

Comments
 (0)