Sfoglia il codice sorgente

Drop products table explicitly before creating view

lanfr144 2 settimane fa
parent
commit
19e33eecb3
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      setup_db.py

+ 1 - 0
setup_db.py

@@ -134,6 +134,7 @@ def run_db_setup():
         "food_db.products_minerals"
     ]
     cursor.execute("DROP VIEW IF EXISTS food_db.products;")
+    cursor.execute("DROP TABLE IF EXISTS food_db.products;")
     for t in tables:
         cursor.execute(f"DROP TABLE IF EXISTS {t};")