v1.0.1: 修复重灌后机构ID自增未重置/行业板块字段错位/研报评分口径一致性
This commit is contained in:
+3
-1
@@ -163,8 +163,10 @@ def table_count(name):
|
||||
|
||||
|
||||
def wipe_all():
|
||||
"""清空业务表(保留结构),用于重灌数据"""
|
||||
"""清空业务表(保留结构)+ 重置自增序列,用于重灌数据"""
|
||||
for t in ("stock_daily", "inst_ratings", "fund_holdings", "news",
|
||||
"institutions", "stocks", "watchlist", "analysis_cache", "market_index"):
|
||||
with db() as conn:
|
||||
conn.execute(f'DELETE FROM "{t}"')
|
||||
with db() as conn:
|
||||
conn.execute("DELETE FROM sqlite_sequence") # 重置 AUTOINCREMENT,保证重灌后 ID 从 1 开始
|
||||
Reference in New Issue
Block a user