Skip to content

Commit fb74973

Browse files
kylec-rpfCopilot
andauthored
Entity-Relationship Diagram (ERD) generation instructions (#725)
Added instructions to the README for how to generate an up-to-date Entity-Relationship Diagram (ERD). Deleted the out-of-date erd.pdf. Added a .erdconfig file to give the generated file a clearer name. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 652dc27 commit fb74973

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

.erdconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
filename: EditorAPI-ERD
2+
title: 'Editor API Entity-Relationship Diagram (ERD)'

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ Handled in `config/initializers/cors.rb`.
151151

152152
This API receives push event data from the [Raspberry Pi Learning](https://github.com/raspberrypilearning) organisation via webhooks. This data is used to create or update code projects related to the [Code Club Projects Site](https://projects.raspberrypi.org), and is processed using the `github_webhooks` gem in the `github_webhooks_controller`. For development purposes, these webhooks are mediated locally through `smee`, which runs in a Docker container.
153153

154+
### Database Structure
155+
156+
Once you have completed the initial setup and have everything running in a container, you can generate an Entity-Relationship Diagram (ERD) to help you to understand the database structure. In order to do this, start things up as usual in one terminal:
157+
158+
`docker-compose up`
159+
160+
then in a second terminal, create the ERD using:
161+
162+
`docker-compose exec api bundle exec erd`
163+
164+
then copy the created ERD out of the container with:
165+
166+
`docker cp "$(docker-compose ps -q api)":/app/EditorAPI-ERD.pdf .`
167+
154168
## Usage
155169

156170
### Projects

erd.pdf

-37.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)