mirror of
https://github.com/kevin-DL/football_info_api.git
synced 2026-01-11 10:04:28 +00:00
19 lines
452 B
Makefile
19 lines
452 B
Makefile
.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
|