-
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
-
Notifications
You must be signed in to change notification settings - Fork 0
husnainkhurshiid/Postgres-Golang-Migration-Rest_api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Connecting golang with PostgreSQL, database migration using flags and Crud Rest Api