aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutility/trunc_and_populate.sh2
-rw-r--r--utility/truncate_script.sql1
2 files changed, 1 insertions, 2 deletions
diff --git a/utility/trunc_and_populate.sh b/utility/trunc_and_populate.sh
index 1e319a2..40c049b 100755
--- a/utility/trunc_and_populate.sh
+++ b/utility/trunc_and_populate.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
echo "Truncating the database."
-psql -U postgres -a -f /home/lemon/code/python/ctrack/utility/truncate_script.sql ctrack
+sudo -u postgres psql -f utility/truncate_script.sql ctrack
sleep 1
diff --git a/utility/truncate_script.sql b/utility/truncate_script.sql
index 3ddebcf..3c151fa 100644
--- a/utility/truncate_script.sql
+++ b/utility/truncate_script.sql
@@ -24,5 +24,4 @@ TRUNCATE TABLE assessments_cafselfassessment RESTART IDENTITY CASCADE;
TRUNCATE TABLE assessments_cafselfassessmentoutcomescore RESTART IDENTITY CASCADE;
TRUNCATE TABLE assessments_achievementlevel RESTART IDENTITY CASCADE;
TRUNCATE TABLE assessments_igp RESTART IDENTITY CASCADE;
-TRUNCATE TABLE users_user RESTART IDENTITY CASCADE;
DELETE FROM users_user WHERE username != 'mrlemon';