Skip to content

[noissue] make db-related dev scripts more idempotent

aguestuser requested to merge ni-make-db-relatd-dev-scripts-more-idempotent into master
  • PROBLEM: make db.migrate and make db.psql both used to act differently based on whether app or db containers were already running
    • make db.migrate would fail if the app wasn't running (you had to start the app first)
    • make db.psql would start a db container (even if you already had one running)
  • FIX:
    • both scripts now check to see if the containers they need are already running.
    • if not running, they create one and spin it down after they are done (to prevent runaway container consumption)
    • if already running, they just exec inside the already-running container

thanks to @mari for pointing out that the existing tooling was confusing!

Merge request reports

Loading