feat: 按允许店铺筛选顺运宝同步 (#196)
This commit is contained in:
@@ -123,6 +123,12 @@ func MigrateSQLiteToMySQL(source, target *sql.DB, dryRun bool) (*SQLiteMigration
|
||||
if err := normalizeMigratedShopeeSKUs(tx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// 历史 SQLite 没有 v14 店铺准入统计;迁移后的旧记录按“未筛选”解释,
|
||||
// 保持接受数等于原始货运单数。
|
||||
if _, err := tx.Exec(`UPDATE syb_sync_runs SET accepted_stock_count=stock_count,
|
||||
shop_skipped_count=0,shop_filter_hash=NULL`); err != nil {
|
||||
return nil, &SQLiteMigrationError{Stage: "无法补齐同步记录店铺统计", Table: "syb_sync_runs", Cause: err}
|
||||
}
|
||||
if err := tx.Commit(); err != nil {
|
||||
return nil, &SQLiteMigrationError{Stage: "无法提交 MySQL 导入事务", Cause: err}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user