Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

db diagram #112

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The code of the platform is open source - take a look at our open issues, contri

The current UI is very basic and we are very open for inputs and help to improve it.

Have a look at our [database schema diagram](db_schema.md).

### Content
Want to help us out with content? We are most interested in contributions that
* document the platform and its usage;
Expand Down
28 changes: 28 additions & 0 deletions Taskfile.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,31 @@ tasks:
cmds:
- 'php bin/console doctrine:migrations:sync-metadata-storage'
- 'php bin/console doctrine:migrations:version --add --all --no-interaction'

generate_schema_diagram:
desc: Generate the db schema diagram mermaid code
cmds:
- |
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--network demokratis_default \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server mysql \
--host database \
--port 3306 \
--database app \
--schemas app \
--user root \
--password root \
--info-level standard \
--command script \
--parents 1 \
--script-language python \
--script mermaid.py \
--output-file share/sc.mmd
- echo -e "#demokratis database schema diagram\n\n\`\`\`mermaid" > db_schema.md
- cat sc.mmd >> db_schema.md
- echo -e "\`\`\`" >> db_schema.md
- rm sc.mmd
Loading
Loading