-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (17 loc) · 818 Bytes
/
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
postgres:
docker run --name postgres_db --network simp_net -p 5432:5432 -e POSTGRES_USER=postgres POSTGRES_PASSWORD=password -d postgres:14.1-alpine
createdb:
docker exec -it postgres_db createdb --username=postgres --owner=postgres simp_bank
dropdb:
docker exec -it postgres_db dropdb --username=postgres simp_bank
migrateup:
goose -dir ./db/migrations postgres postgresql://postgres:password@localhost:5432/simp_bank up
migratedown:
goose -dir ./db/migrations postgres postgresql://postgres:password@localhost:5432/simp_bank down
sqlc:
sqlc generate
serverrun:
go run main.go
mock:
mockgen --build_flags=--mod=mod -destination db/mock/store.go -package mock_db github.com/julianinsua/the_simp_bank/internal/database Store
.PHONY: postgres createdb dropdb migrateup migratedown sqlc serverrun mock