db/sqlc: add account related tables and queries

This commit also contains the sqlc.yaml file, the `make sqlc` command
and the script for generating sqlc code. This must be done in this
commit as the script only works if there are queries to generate from.
This commit is contained in:
Elle Mouton 2024-12-21 19:46:06 +02:00
parent 09c1c16fb7
commit caec0742db
No known key found for this signature in database
GPG key ID: D7D916376026F177
10 changed files with 729 additions and 0 deletions

View file

@ -300,6 +300,14 @@ clean: clean-itest
$(RM) ./litd-debug
$(RM) coverage.txt
sqlc:
@$(call print, "Generating sql models and queries in Go")
./scripts/gen_sqlc_docker.sh
sqlc-check: sqlc
@$(call print, "Verifying sql code generation.")
if test -n "$$(git status --porcelain '*.go')"; then echo "SQL models not properly generated!"; git status --porcelain '*.go'; exit 1; fi
# Prevent make from interpreting any of the defined goals as folders or files to
# include in the build process.
.PHONY: default all yarn-install build install go-build go-build-noui \