summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_finds/models_treatments.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 89364f0fe..85d1cb0d0 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -710,8 +710,8 @@ class FindNonModifTreatments(AbsFindTreatments):
DO INSTEAD DELETE FROM archaeological_finds_find where id=NULL;
"""
DELETE_SQL = """
- DROP VIEW find_nonmodif_treatments;
- DROP VIEW find_nonmodif_treatments_tree;
+ DROP VIEW IF EXISTS find_nonmodif_treatments;
+ DROP VIEW IF EXISTS find_nonmodif_treatments_tree;
"""
TABLE_COLS = ['treatment__treatment_type',
'treatment__upstream',
@@ -767,8 +767,8 @@ class FindUpstreamTreatments(AbsFindTreatments):
DO INSTEAD DELETE FROM archaeological_finds_find where id=NULL;
"""
DELETE_SQL = """
- DROP VIEW find_uptreatments;
- DROP VIEW find_uptreatments_tree;
+ DROP VIEW IF EXISTS find_uptreatments;
+ DROP VIEW IF EXISTS find_uptreatments_tree;
"""
TABLE_COLS = ['treatment__treatment_type',
'treatment__upstream',
@@ -824,8 +824,8 @@ class FindDownstreamTreatments(AbsFindTreatments):
DO INSTEAD DELETE FROM archaeological_finds_find where id=NULL;
"""
DELETE_SQL = """
- DROP VIEW find_downtreatments;
- DROP VIEW find_downtreatments_tree;
+ DROP VIEW IF EXISTS find_downtreatments;
+ DROP VIEW IF EXISTS find_downtreatments_tree;
"""
TABLE_COLS = ['treatment__treatment_type',
'treatment__downstream',
@@ -858,7 +858,7 @@ class FindTreatments(AbsFindTreatments):
DO INSTEAD DELETE FROM archaeological_finds_find where id=NULL;
"""
DELETE_SQL = """
- DROP VIEW find_treatments;
+ DROP VIEW IF EXISTS find_treatments;
"""
upstream = models.BooleanField(_(u"Is upstream"))