Skip to content

ohkrab/examples

Repository files navigation

Examples

Setup

  1. Install krab

https://ohkrab.dev/docs/get_started/installation/

  1. Spin up test database and db browser
docker-compose up

Browser can be accessed at: http://localhost:5556/

  1. Export database url
export DATABASE_URL=postgres://krab:secret@localhost:5555/krab?sslmode=disable

Run example

  1. Export dir with example
export KRAB_DIR=migrations-simple/
  1. Run a command
krab
  1. Try other commands
krab migrate up animals
krab migrate status animals
krab migrate down animals -version v1
krab migrate status animals