From 1b8e1ef4104ef9222fc0ab9a5e72e2e11fe0385d Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Fri, 17 Feb 2023 10:24:58 +0200 Subject: [PATCH] feat(api): add redo script --- api/README.md | 4 ++++ api/scripts/dev-migr-redo.sh | 2 ++ 2 files changed, 6 insertions(+) create mode 100755 api/scripts/dev-migr-redo.sh diff --git a/api/README.md b/api/README.md index bbb9396..db2b3d7 100644 --- a/api/README.md +++ b/api/README.md @@ -9,3 +9,7 @@ development environment. Uses `docker-compose.dev.yaml` to set it up. `scripts/dev-migr.sh` can be used to run migration in the development database that the other script sets up. + +`scripts/dev-migr-redo.sh` can be used to redo the migrations. +As in, it will run down.sql, and then up.sql again, useful for making sure +migrations work correctly, and for experimenting. diff --git a/api/scripts/dev-migr-redo.sh b/api/scripts/dev-migr-redo.sh new file mode 100755 index 0000000..244acaf --- /dev/null +++ b/api/scripts/dev-migr-redo.sh @@ -0,0 +1,2 @@ +#!/bin/sh +~/.cargo/bin/diesel migration run --database-url postgres://laurelin:laurelin@localhost:5432/laurelin -- 2.44.1