Skip to content

Commit ffdf0cc

Browse files
authored
Merge pull request #25 from chris-ramon/improvements
`README`: adds db migrations docs.
2 parents 8f10871 + 3193ea0 commit ffdf0cc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ cat app.rsa.pub | base64 | tr -d '\n'|pbcopy
3232

3333
[http://localhost:8080/graphql](http://localhost:8080/graphql)
3434

35+
##### DB Migrations
36+
37+
```bash
38+
docker exec -it golang-scaffolding-app-1 bash
39+
```
40+
41+
Up one migration:
42+
43+
```bash
44+
migrate -database "postgres://admin:admin@db:5432/local?sslmode=disable" -path "./db/migrations" up 1
45+
```
46+
47+
Down one migration:
48+
49+
```bash
50+
migrate -database "postgres://admin:admin@db:5432/local?sslmode=disable" -path "./db/migrations" down 1
51+
```
52+
3553

3654
##### Features
3755

0 commit comments

Comments
 (0)