feat: 归档旧迁移文件,创建初始化数据迁移和重置脚本

This commit is contained in:
2026-04-14 11:24:35 +08:00
parent c35542f911
commit 5e9e41db21
231 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
-- 回滚删除补建的空钱包仅删除余额为0且无交易记录的钱包
DELETE FROM tb_asset_wallet
WHERE balance = 0
AND frozen_balance = 0
AND deleted_at IS NULL
AND id NOT IN (
SELECT DISTINCT asset_wallet_id FROM tb_asset_wallet_transaction WHERE deleted_at IS NULL
);