Browse Source

Drop products table explicitly before creating view

lanfr144 2 tuần trước cách đây
mục cha
commit
19e33eecb3
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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};")