diff options
Diffstat (limited to 'utility')
-rwxr-xr-x | utility/trunc_and_populate.sh | 2 | ||||
-rw-r--r-- | utility/truncate_script.sql | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/utility/trunc_and_populate.sh b/utility/trunc_and_populate.sh index 40c049b..1e319a2 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." -sudo -u postgres psql -f utility/truncate_script.sql ctrack +psql -U postgres -a -f /home/lemon/code/python/ctrack/utility/truncate_script.sql ctrack sleep 1 diff --git a/utility/truncate_script.sql b/utility/truncate_script.sql index 864b99f..3ddebcf 100644 --- a/utility/truncate_script.sql +++ b/utility/truncate_script.sql @@ -12,6 +12,11 @@ TRUNCATE TABLE caf_grading RESTART IDENTITY CASCADE; TRUNCATE TABLE caf_caf RESTART IDENTITY CASCADE; TRUNCATE TABLE caf_documentfile RESTART IDENTITY CASCADE; TRUNCATE TABLE caf_applicablesystem RESTART IDENTITY CASCADE; +TRUNCATE TABLE caf_filestore RESTART IDENTITY CASCADE; +TRUNCATE TABLE caf_documentfile RESTART IDENTITY CASCADE; +TRUNCATE TABLE register_engagementevent RESTART IDENTITY CASCADE; +TRUNCATE TABLE register_engagementtype RESTART IDENTITY CASCADE; +TRUNCATE TABLE register_engagementevent_participants RESTART IDENTITY CASCADE; TRUNCATE TABLE assessments_cafcontributingoutcome RESTART IDENTITY CASCADE; TRUNCATE TABLE assessments_cafobjective RESTART IDENTITY CASCADE; TRUNCATE TABLE assessments_cafprinciple RESTART IDENTITY CASCADE; @@ -19,4 +24,5 @@ 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'; |