From 3a5f31bfac515c134f98d79c87b061b0fd6b572b Mon Sep 17 00:00:00 2001 From: mcbloch Date: Thu, 4 Apr 2019 18:27:50 +0200 Subject: [PATCH] add database population script --- app/database/add_admins.py | 7 ++++++- populate-db.sh | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 populate-db.sh diff --git a/app/database/add_admins.py b/app/database/add_admins.py index e84a010..d6053ec 100644 --- a/app/database/add_admins.py +++ b/app/database/add_admins.py @@ -14,4 +14,9 @@ def add(): iepoev = User() iepoev.configure('iepoev', True, 1) db.session.add(iepoev) - # To future developers, add yourself here \ No newline at end of file + + flynn = User() + flynn.configure('flynn', True, 0) + db.session.add(flynn) + + # To future developers, add yourself here diff --git a/populate-db.sh b/populate-db.sh new file mode 100755 index 0000000..599127f --- /dev/null +++ b/populate-db.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd app +cp database/* . +../venv/bin/python create_database.py +rm -f add_* create_database.py muhscheme