lydgs commited on
Commit
7d62689
·
verified ·
1 Parent(s): cd640eb

Update scripts/backup_to_dataset.py

Browse files
Files changed (1) hide show
  1. scripts/backup_to_dataset.py +2 -2
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 = []