From eb0f89f4e9a6ba6726999417ae88ce2a831bf6e8 Mon Sep 17 00:00:00 2001 From: sloane <1699281+sloanelybutsurely@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:36:48 -0400 Subject: [PATCH] add vitally-reset-database helper --- .../functions/vitally-reset-database.fish | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .config/fish/functions/vitally-reset-database.fish diff --git a/.config/fish/functions/vitally-reset-database.fish b/.config/fish/functions/vitally-reset-database.fish new file mode 100644 index 0000000..23624f7 --- /dev/null +++ b/.config/fish/functions/vitally-reset-database.fish @@ -0,0 +1,19 @@ +function vitally-reset-database + set -l current_directory $(pwd) + + cd ~/code/Vitallyio/vitally/master/ + + # destroy and recreate docker containers + docker-compose down -v + docker-compose up -d + + # setup the databases + PGPASSWORD=password dev/setup_dev_dbs.sh -h localhost -U postgres -p 5432 -w + + cd $current_directory + + # seed the empty environment + yarn migrate + yarn seed:plans + yarn seed --subdomain dev --organizations 15 --accounts 60 +end