Initial commit

This commit is contained in:
2023-07-02 15:26:53 +01:00
committed by GitHub
commit 16ca35eb45
42 changed files with 4536 additions and 0 deletions

19
Makefile Normal file
View File

@@ -0,0 +1,19 @@
.PHONY: migrate migrate_down
DB?=football
MODEL?=
migrate:
@echo "Running migrations"
goose -dir sql/schema postgres postgres://postgres:@localhost:5432/$(DB) up
migrate_down:
@echo "Running down migrations"
goose -dir sql/schema postgres postgres://postgres:@localhost:5432/$(DB) down
genmodel:
@echo "Generating ent schema for model"
go run -mod=mod entgo.io/ent/cmd/ent new $(MODEL)
gencode:
@echo "Generating ent code"
go generate ./ent