-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 752 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (23 loc) · 752 Bytes
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
.PHONY: sqlc-generate sqlc-clean seed
# Include .env file
include .env
export
# Generate all sqlc code
sqlc-generate:
@echo "Generating repository code..."
sqlc generate
@echo "✓ Done! All code generated in internal/repository/"
# Run database migrations
migrate-up:
@echo "Running database migrations..."
migrate -path migrations -database "postgresql://$(DATABASE_USER):$(DATABASE_PASSWORD)@$(DATABASE_HOST):$(DATABASE_PORT)/$(DATABASE_NAME)?sslmode=disable" up
@echo "✓ Migrations complete!"
# Seed the database with initial data
seed:
@echo "Seeding database..."
go run cmd/seed/main.go
@echo "✓ Database seeded successfully!"
# Run the wallet service
run:
@echo "Starting wallet service..."
go run cmd/wallet-service/main.go