Eralchemy2 target for generating er diagrams

This commit is contained in:
Imbus 2024-03-08 11:22:09 +01:00
parent a7ebfe7110
commit 02c9c502b8
2 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
bin bin
db.sqlite3 db.sqlite3
*.png
# Test binary, built with `go test -c` # Test binary, built with `go test -c`
*.test *.test

View file

@ -80,6 +80,12 @@ docs:
docfmt: docfmt:
swag fmt swag fmt
# Generate ERD
# Requires eralchemy2
.PHONY: eralchemy
erd:
eralchemy2 -i sqlite:///db.sqlite3 -o erd.png
install-swag: install-swag:
@echo "Installing swag" @echo "Installing swag"
@go get -u github.com/swaggo/swag/cmd/swag @go get -u github.com/swaggo/swag/cmd/swag