aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a4a97cb..e69abd8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,30 @@
+SUPERUSER_NAME=mlemon
+SUPERUSER_PASSWD=lemonlemon
+SUPERUSER_EMAIL=bob@bob.com
+DATABASE_NAME=ctrack
+DATABASE_USER=postres
+
test:
pytest --tb=short -v
test-fast:
pytest -k "not test_functional" --tb=short
+
+initialisedb: populate
+ python manage.py createsuperuser
+
+populate: migrate
+ @echo "Populating new database with test data."
+ python manage.py populate_db
+
+migrate: createdb
+ @echo "Migrating."
+ python manage.py migrate
+
+createdb: dropdb
+ @echo "Creating a new database."
+ createdb $(DATABASE_NAME) -O postgres
+
+dropdb:
+ @echo "Dropping any existing ctrack database."
+ psql -U postgres -c "DROP DATABASE IF EXISTS $(DATABASE_NAME);"