DEV Community

Discussion on: How to write & run database migration in Golang

Collapse
 
mquanit profile image
Mohammad Quanit

Hi Apoorv, try this cmd first

migrate -path db/migration -database "postgresql://root:secret@localhost:5432/simple_bank?sslmode=disable" force 1

and then run makefile cmd

make migrateup

it should solve this issue. Here's the docs for it
github.com/golang-migrate/migrate/...