busybar / Makefile
Makefile
Raw
.PHONY: create-migration migrate up down

include .env
export $(shell sed 's/=.*//' .env)

MIGRATE_CMD=migrate -database $(DATABASE_URL) -path ./migrations

create-migration:
	@read -p "enter migration name: " name; \
	go run ./cmd/cli/main.go migration $$name

migrate:
	$(MIGRATE_CMD) up

up:
	$(MIGRATE_CMD) up

down:
	$(MIGRATE_CMD) down