From 53a360ffcd8946192db3259a0d8766830a59e22f Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Mon, 6 Jun 2022 22:28:49 +0000 Subject: [PATCH 1/2] chore(init): delete existing database file avoid unnecessary warning message about pending migrations since we want to rebuild the database from scratch anyway --- bin/init.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/init.sh b/bin/init.sh index 993aae4e2..0c960dcae 100755 --- a/bin/init.sh +++ b/bin/init.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -eu +# remove existing (old) database file +# -f forces the delete (and avoids an error when the file doesn't exist) + +rm -f django.db + # run database migrations python manage.py migrate From db5feb0b5741c0cd1b98eb5400ae29cf973faf21 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Mon, 6 Jun 2022 22:48:57 +0000 Subject: [PATCH 2/2] docs(configuration): simplify init command --- docs/configuration/fixtures.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/configuration/fixtures.md b/docs/configuration/fixtures.md index dc3a276e1..6d74aaa02 100644 --- a/docs/configuration/fixtures.md +++ b/docs/configuration/fixtures.md @@ -59,8 +59,6 @@ The file is called `django.db` and the following commands will rebuild it. Run these commands from within the repository root, inside the devcontainer: ```bash -rm django.db - bin/init.sh ```