Fix: Check table existence before migration

This commit is contained in:
2026-01-06 20:59:56 +09:00
parent 77e0c07553
commit 7a61f17138
2 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
name: GDM name: GDM
package_name: gommi_downloader_manager package_name: gommi_downloader_manager
version: '0.1.14' version: '0.1.15'
description: FlaskFarm 범용 다운로더 큐 - YouTube, 애니24, 링크애니, Anilife 지원 description: FlaskFarm 범용 다운로더 큐 - YouTube, 애니24, 링크애니, Anilife 지원
developer: projectdx developer: projectdx
home: https://gitea.yommi.duckdns.org/projectdx/gommi_downloader_manager home: https://gitea.yommi.duckdns.org/projectdx/gommi_downloader_manager

View File

@@ -69,6 +69,12 @@ class ModelDownloadItem(ModelBase):
conn = sqlite3.connect(db_file) conn = sqlite3.connect(db_file)
cursor = conn.cursor() cursor = conn.cursor()
# 테이블 존재 여부 확인
cursor.execute(f"SELECT count(*) FROM sqlite_master WHERE type='table' AND name='{cls.__tablename__}'")
if cursor.fetchone()[0] == 0:
conn.close()
return
# meta 컬럼 확인 # meta 컬럼 확인
cursor.execute(f"PRAGMA table_info({cls.__tablename__})") cursor.execute(f"PRAGMA table_info({cls.__tablename__})")
columns = [info[1] for info in cursor.fetchall()] columns = [info[1] for info in cursor.fetchall()]