From 7f88b7f7b8bdbb8085fe7c7a2b66152164cb84d0 Mon Sep 17 00:00:00 2001
From: David Trattnig <david@subsquare.at>
Date: Mon, 28 Nov 2022 14:17:12 +0100
Subject: [PATCH] feat(Make): re-create db

---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index e2ff1ab8..b6c9a0de 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ help::
 	@echo "    spell           - check spelling of text"
 	@echo "    format          - apply automatic formatting"
 	@echo "    test            - run test suite"
+	@echo "    recreatedb      - drop and re-init the database"
 	@echo "    log             - tail log file"
 	@echo "    run             - start app"
 	$(call docker_help)
@@ -85,6 +86,10 @@ format::
 test::
 	poetry run python3 -m unittest discover .
 
+recreatedb::
+	sudo -u postgres psql -f contrib/postgresql-drop-all.sql
+	sudo -u postgres psql -f contrib/postgresql-create-database.sql
+
 log::
 	tail -f logs/AuraEngine.log
 
-- 
GitLab