migrate create -ext sql -dir database/migrations -seq '<migration_name>'
migrate -database "postgres://user:password@localhost:5432/your_db?sslmode=disable" -path database/migrations up
-
to undo migrations migrate -database "postgres://user:password@localhost:5432/your_db?sslmode=disable" -path database/migrations down 1
-
to reset migrations migrate -database "postgres://user:password@localhost:5432/your_db?sslmode=disable" -path database/migrations down
-
Force state migrate -database "postgres://user:password@localhost:5432/your_db?sslmode=disable" -path database/migrations force 0 migrate -database "postgres://user:password@localhost:5432/your_db?sslmode=disable" -path database/migrations force 1
go run cmd/web/main.go