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
Copy file name to clipboardExpand all lines: docs/using-gitbase/schema.md
+17-77
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,21 @@ This table represents the relation between commits and blobs. With this table yo
150
150
151
151
This table represents the relation between commits and trees. With this table you can obtain all the tree entries contained on a commit object.
152
152
153
+
### commit_files
154
+
```sql
155
+
+---------------+------+
156
+
| name | type |
157
+
+---------------+------+
158
+
| repository_id | TEXT |
159
+
| commit_hash | TEXT |
160
+
| file_path | TEXT |
161
+
| blob_hash | TEXT |
162
+
| tree_hash | TEXT |
163
+
+---------------+------+
164
+
```
165
+
166
+
This table represents the relation between commits and [files](#files). Using this table, you can obtain all the files related to a certain commit object.
167
+
153
168
### ref_commits
154
169
```sql
155
170
+---------------+-------+
@@ -171,83 +186,8 @@ Commits will be repeated if they are in several repositories or references.
171
186
## Database diagram
172
187
<!--
173
188
174
-
repositories as r
175
-
-
176
-
repository_id string
177
-
178
-
remotes
179
-
-
180
-
repository_id string FK - r.repository_id
181
-
remote_name string
182
-
remote_push_url string
183
-
remote_fetch_url string
184
-
remote_push_refspec string
185
-
remote_fetch_refspec string
186
-
187
-
refs
188
-
-
189
-
repository_id string FK >- repositories.repository_id
190
-
ref_name string
191
-
commit_hash string FK >- commits.commit_hash
192
-
193
-
commits as c
194
-
-
195
-
repository_id string FK >- repositories.repository_id
196
-
commit_hash string
197
-
commit_author_name string
198
-
commit_author_email string
199
-
commit_author_when timestamp
200
-
committer_name string
201
-
committer_email string
202
-
committer_when timestamp
203
-
commit_message string
204
-
tree_hash string FK >- tree_entries.tree_hash
205
-
commit_parents array[string]
206
-
207
-
blobs as b
208
-
-
209
-
repository_id string FK >- repositories.repository_id
210
-
blob_hash string
211
-
blob_size number
212
-
blob_content blob
213
-
214
-
tree_entries as te
215
-
-
216
-
repository_id string FK >- repositories.repository_id
217
-
tree_hash string
218
-
blob_hash string FK >- blobs.blob_hash
219
-
tree_entry_mode number
220
-
tree_entry_name string
221
-
222
-
files as f
223
-
-
224
-
repository_id string FK >- repositories.repository_id
225
-
blob_hash string FK >- blobs.blob_hash
226
-
file_path string
227
-
tree_hash string FK >- tree_entries.tree_hash
228
-
tree_entry_mode number
229
-
blob_content blob
230
-
blob_size number
231
-
232
-
ref_commits
233
-
-
234
-
repository_id string FK >- repositories.repository_id
235
-
commit_hash string FK >- commits.commit_hash
236
-
ref_name string FK >- refs.ref_name
237
-
index number
238
-
239
-
commit_trees
240
-
-
241
-
repository_id string FK >- repositories.repository_id
242
-
commit_hash string FK >- commits.commit_hash
243
-
tree_hash string FK >- tree_entries.tree_hash
244
-
245
-
commit_blobs
246
-
-
247
-
repository_id string FK >- repositories.repository_id
248
-
commit_hash string FK >- commits.commit_hash
249
-
blob_hash string FK >- blobs.blob_hash
189
+
Diagram generated with MySQL Workbench. Edit the model in docs/assets/gitbase_model.mwb to generate a new diagram in case it needs some changes.
0 commit comments