-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 1.38 KB
/
Makefile
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
29
30
31
32
33
34
35
36
37
38
39
40
up:
@echo "Running in Development mode..."
@docker compose -f ./build/compose/compose.yaml up -d
@echo "Development mode completed."
down:
@echo "Running in Development mode..."
@docker compose -f ./build/compose/compose.yaml down --volumes
@echo "Development mode completed."
# Make migrations
migrate-up:
@echo "Making migrations..."
@migrate -path ./internal/store/database/mysql/migrations -database "mysql://root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/luganodes" -verbose up
@echo "Migrations completed."
# Delete migrations
migrate-down:
@echo "Deleting migrations..."
@migrate -path ./internal/store/database/mysql/migrations -database "mysql://root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/luganodes" -verbose down
# Make migrations Devlopment environment
migrate-up-dev:
@echo "Making migrations..."
@migrate -path ./internal/store/database/mysql/migrations -database "mysql://root:password@tcp(localhost:3306)/luganodes" -verbose up
@echo "Migrations completed."
# Delete migrations Devlopment environment
migrate-down-dev:
@echo "Deleting migrations..."
@migrate -path ./internal/store/database/mysql/migrations -database "mysql://root:password@tcp(localhost:3306)/luganodes" -verbose down
# SQLC generate
sqlc-gen:
@echo "Generating SQLC..."
@sqlc generate -f ./internal/store/database/mysql/sqlc/sqlc.yaml
@echo "SQLC generation completed."