Skip to content

Commit caec074

Browse files
committed
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.
1 parent 09c1c16 commit caec074

File tree

10 files changed

+729
-0
lines changed

10 files changed

+729
-0
lines changed

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ clean: clean-itest
300300
$(RM) ./litd-debug
301301
$(RM) coverage.txt
302302

303+
sqlc:
304+
@$(call print, "Generating sql models and queries in Go")
305+
./scripts/gen_sqlc_docker.sh
306+
307+
sqlc-check: sqlc
308+
@$(call print, "Verifying sql code generation.")
309+
if test -n "$$(git status --porcelain '*.go')"; then echo "SQL models not properly generated!"; git status --porcelain '*.go'; exit 1; fi
310+
303311
# Prevent make from interpreting any of the defined goals as folders or files to
304312
# include in the build process.
305313
.PHONY: default all yarn-install build install go-build go-build-noui \

0 commit comments

Comments
 (0)