Spaces:
Runtime error
Runtime error
Update scripts/backup_to_dataset.py
Browse files
scripts/backup_to_dataset.py
CHANGED
|
@@ -24,8 +24,8 @@ def export_db_to_json(db_path, temp_dir):
|
|
| 24 |
conn = sqlite3.connect(db_path)
|
| 25 |
cursor = conn.cursor()
|
| 26 |
|
| 27 |
-
# 获取所有表
|
| 28 |
-
cursor.execute("SELECT name FROM sqlite_master WHERE type='table'
|
| 29 |
tables = cursor.fetchall()
|
| 30 |
|
| 31 |
exported_files = []
|
|
|
|
| 24 |
conn = sqlite3.connect(db_path)
|
| 25 |
cursor = conn.cursor()
|
| 26 |
|
| 27 |
+
# 获取所有用户表,排除系统表
|
| 28 |
+
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'")
|
| 29 |
tables = cursor.fetchall()
|
| 30 |
|
| 31 |
exported_files = []
|