ソースを参照

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