-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (15 loc) · 725 Bytes
/
Makefile
File metadata and controls
23 lines (15 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
dockerinit:
docker run --name postgresdisko -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=password -d postgres
postgres:
docker exec -it postgresdisko psql
createdb:
docker exec -it postgresdisko createdb --username=root --owner=root diskoDB
dropdb:
docker exec -it postgresdisko dropdb go-chat
migratecreate:
migrate create -ext sql -dir db/migrations add_channel_table
migrateup:
migrate -path db/migrations -database "postgresql://root:password@localhost:5432/diskoDB?sslmode=disable" -verbose up
migratedown:
migrate -path db/migrations -database "postgresql://root:password@localhost:5432/diskoDB?sslmode=disable" -verbose down
.PHONY: dockerinit postgres createdb dropdb migrateup migratedown