diff --git a/sqlc.yaml b/sqlc.yaml new file mode 100644 index 0000000..f36eec7 --- /dev/null +++ b/sqlc.yaml @@ -0,0 +1,11 @@ +version: "2" + +sql: + - engine: "postgresql" + schema: "./internal/database/migrations/" + queries: + - "./internal/service/*/" + gen: + go: + package: "dbgen" + out: "./internal/database/dbgen/" diff --git a/taskfile.yaml b/taskfile.yaml index 84a704f..8b4d991 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -17,6 +17,7 @@ tasks: build: deps: - clean + - gen-db - gen-css cmds: - task fmt @@ -33,6 +34,12 @@ tasks: goose: cmd: eval $(go run ./cmd/goose/. {{.CLI_ARGS}}) + gen-db: + cmd: sqlc generate + + reset-db: + cmd: go run ./cmd/resetdb/. + gen-css: cmd: > npm run tailwindcss -- @@ -58,6 +65,3 @@ tasks: fixperms: # Fixes the permissions of the files in the project cmd: ./scripts/fixperms.sh - - reset-db: - cmd: go run ./cmd/resetdb/.