-
postgres://<username>:<password>@localhost/<database_name>?sslmode=disable
-
-
go run main.go --migration up
-
go run main.go --migration down
-
-
If you're getting the bellow error
Error parsing migration (table_name.sql): ERROR: no Up/Down annotations found, so no statements were executed.
In the migration file Set tags as
Up
andDown
instead ofup
down
- -- +migrate UP
- -- +migrate Down