mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
PostgresStore was 86% stubs behind a build tag nothing enables, pgdbgen carried hand-added build tags that fought sqlc-verify, and the runtime never threaded store.Store through the handler boundary. Single-engine reality shrinks the W1-3 attachment-ownership fix and ends the pgdbgen churn. Removed: store/postgres.go, db/pgdbgen/, db/queries/postgres/, migrations/postgres/, the sqlc postgres block, pgx from go.mod, the startup-refusal branch, and the dead Postgres config surface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
1.1 KiB
Makefile
36 lines
1.1 KiB
Makefile
# OwnCord Server — developer convenience targets
|
|
#
|
|
# sqlc-generate Regenerate type-safe Go from sqlc.yaml (db/dbgen).
|
|
# sqlc-verify Fail if the committed dbgen output is stale (used by CI).
|
|
# sqlc-install Install the pinned sqlc version into $GOBIN.
|
|
# otel-up Start Jaeger + Prometheus for local tracing development.
|
|
# otel-down Stop and remove the OTel dev containers.
|
|
|
|
SQLC_VERSION := $(shell cat sqlc.version)
|
|
|
|
.PHONY: sqlc-install sqlc-generate sqlc-verify otel-up otel-down
|
|
|
|
sqlc-install:
|
|
go install github.com/sqlc-dev/sqlc/cmd/sqlc@$(SQLC_VERSION)
|
|
|
|
sqlc-generate:
|
|
sqlc generate
|
|
|
|
sqlc-verify:
|
|
sqlc generate
|
|
@git diff --exit-code db/dbgen || ( \
|
|
echo "ERROR: generated sqlc output is stale. Run 'make sqlc-generate' and commit the result." ; \
|
|
exit 1 ; \
|
|
)
|
|
|
|
# Phase B Step 8 — local OTel development stack.
|
|
# Starts Jaeger (traces) and Prometheus (metrics) in Docker.
|
|
# Jaeger UI: http://localhost:16686
|
|
# Prometheus UI: http://localhost:9090
|
|
# Run the server with: go build -tags otel . && ./owncord-server
|
|
otel-up:
|
|
docker compose -f docker-compose.otel.yml up -d
|
|
|
|
otel-down:
|
|
docker compose -f docker-compose.otel.yml down
|