From 0345b55ddac31b883c57789506b35c5b8695fa79 Mon Sep 17 00:00:00 2001 From: amandine-sahl Date: Wed, 2 Mar 2022 15:40:59 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20test=20cr=C3=A9ation=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apptax/migrations/taxref/commands.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apptax/migrations/taxref/commands.py b/apptax/migrations/taxref/commands.py index 8e7e29a3..45c901b8 100644 --- a/apptax/migrations/taxref/commands.py +++ b/apptax/migrations/taxref/commands.py @@ -180,7 +180,7 @@ def import_and_format_dbc_status(): text( """ --- Suppression des données en double contenu dans la table bdc_statut - CREATE INDEX bdc_statut_id_idx ON taxonomie.bdc_statut (id); + CREATE INDEX IF NOT EXISTS bdc_statut_id_idx ON taxonomie.bdc_statut (id); WITH d AS ( SELECT @@ -199,9 +199,6 @@ def import_and_format_dbc_status(): FROM taxonomie.bdc_statut s USING id_doublon d WHERE s.id = d.to_del and not id = min; - - DROP INDEX taxonomie.bdc_statut_id_idx; - """ ) )