Преглед изворни кода

Drop products table explicitly before creating view

lanfr144 пре 2 недеља
родитељ
комит
19e33eecb3
1 измењених фајлова са 1 додато и 0 уклоњено
  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};")