mirror of
https://github.com/kevin-DL/football_info_api.git
synced 2026-01-22 06:25:20 +00:00
Initial commit
This commit is contained in:
19
Makefile
Normal file
19
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user