瀏覽代碼

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};")