From 5fcc55ae3d4f1741470801ef553fa5e5e0531d1f Mon Sep 17 00:00:00 2001 From: AnonymousWP <50231698+AnonymousWP@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:39:57 +0200 Subject: [PATCH] ops(migrations): automate migration process --- Makefile | 5 ++++- install.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 463846a2..f1559dcf 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,11 @@ else endif changepassword: ## Change password for user - ${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} exec web python3 manage.py changepassword + +migrate: ## Apply migrations + ${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} exec web python3 manage.py migrate + pull: ## Pull Docker images. docker login docker.pkg.github.com ${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} pull diff --git a/install.sh b/install.sh index 996ff712..0f27a4b3 100755 --- a/install.sh +++ b/install.sh @@ -144,6 +144,7 @@ if [ "${failed}" -eq 0 ]; then echo "Creating an account" echo "#########################################################################" make username isNonInteractive=$isNonInteractive + make migrate tput setaf 2 && printf "\n%s\n" "Thank you for installing reNgine, happy recon!!" echo "In case you have unapplied migrations (see above in red), run 'make migrate'"