-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 1.04 KB
/
Makefile
File metadata and controls
28 lines (22 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Venue Postgres connection string
# Currently using localhost for local development and db migration
# Make sure to change DSN when migrating on actual deployed db
VENUE_POSTGRES_DSN = postgres://root:toor@localhost:5432/venue_service_db?sslmode=disable
AUTH_POSTGRES_DSN = postgres://root:toor@localhost:5433/auth_service_db?sslmode=disable
# Venue database migrations
venue-db-up:
migrate -path venue-service/migrations -database "${VENUE_POSTGRES_DSN}" -verbose up ${n}
venue-db-down:
migrate -path venue-service/migrations -database "${VENUE_POSTGRES_DSN}" -verbose down ${n}
# Auth database migrations
auth-db-up:
migrate -path auth-service/migrations -database "${AUTH_POSTGRES_DSN}" -verbose up ${n}
auth-db-down:
migrate -path auth-service/migrations -database "${AUTH_POSTGRES_DSN}" -verbose down ${n}
# Migrate all databases up
db-up: venue-db-up auth-db-up
# Migrate all databases down
db-down: venue-db-down auth-db-down
# reset db
db-reset: db-down db-up
.PHONY: venue-db-up venue-db-down auth-db-up auth-db-down db-up db-down db-reset