diff --git a/README.md b/README.md index 4ffc8ba..edfc138 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,21 @@ cd backend/ sqlc generate ``` +### Migrations + +Database migrations require `golang-migrate`. + +``` +go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest +``` + +Migrations then can be run with: + +``` +cd backend/ +migrate -path sql/migrations -database $DATABASE_URL up +``` + ### Running the app The backend requires configuration via environment variables - see `backend/.env.example`. All variables must be set unless they are marked as optional.