You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -54,23 +68,35 @@ You can define the following fields for a column:
54
68
- Check constraint
55
69
- Comment
56
70
57
-
:::info
71
+
:::info
58
72
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.
60
74
61
75
:::
62
76
63
-
:::info
77
+
:::info
64
78
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.
66
80
67
81
:::
68
82
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
70
92
71
93
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.
72
94
73
-
<ThemedImage lightImageSrc={require("./img/light/create-relationship.gif").default} darkImageSrc={require("./img/dark/create-relationship.gif").default} alt="Create a relationship" />
E.g. in the image above, since `posts.user_id` is the foreign key we start dragging from `user_id` to `users.id`.
76
102
@@ -101,11 +127,11 @@ A join table is a third table that contains foreign keys to the 2 tables you'd l
101
127
102
128
</FAQ>
103
129
104
-
## Organize with subject areas
130
+
## Subject areas
105
131
106
132
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.
107
133
108
-
## Add notes
134
+
## Notes
109
135
110
136
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.
111
137
@@ -122,6 +148,6 @@ If the diagram type supports custom types there will be an additional `Types` ta
122
148
123
149
Upon adding a new type, it will be added to the list of types you can choose from when editing a column.
124
150
125
-
## Define Enums (PostgreSQL)
151
+
## Enums (PostgreSQL)
126
152
127
153
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.
0 commit comments