-- ============================================================
-- 订单回收和发货数据迁移脚本
-- Feature: database-migration, Property 2: 数据记录数一致性
-- Validates: Requirements 3.5
-- ============================================================
-- 源表: MySQL order_list_recovery (8 条记录)
-- 源表: MySQL order_list_send (0 条记录)
-- 目标表: SQL Server order_items_recovery, order_items_send
-- ============================================================

USE honey_box;
GO

-- ============================================================
-- 迁移 order_items_recovery 数据
-- ============================================================

SET IDENTITY_INSERT order_items_recovery ON;
GO

INSERT INTO order_items_recovery (
    id, user_id, recovery_num, money, count, addtime, created_at, updated_at
)
VALUES
(20300, 24904, N'HS_202512285449989991321', 4.00, 2, 1766915238, DATEADD(SECOND, 1766915238, '1970-01-01'), GETDATE()),
(20301, 24904, N'HS_202512285498505453227', 2.00, 1, 1766915334, DATEADD(SECOND, 1766915334, '1970-01-01'), GETDATE()),
(20302, 24904, N'HS_202512285552100508665', 2.00, 1, 1766915383, DATEADD(SECOND, 1766915383, '1970-01-01'), GETDATE()),
(20303, 24904, N'HS_202512285255491072447', 49.00, 1, 1766915428, DATEADD(SECOND, 1766915428, '1970-01-01'), GETDATE()),
(20304, 24904, N'HS_202512289710010031317', 49.00, 1, 1766915450, DATEADD(SECOND, 1766915450, '1970-01-01'), GETDATE()),
(20305, 24904, N'HS_202512285355515361069', 2.00, 1, 1766915509, DATEADD(SECOND, 1766915509, '1970-01-01'), GETDATE()),
(20306, 24904, N'HS_202512289952485047239', 2.00, 1, 1766915532, DATEADD(SECOND, 1766915532, '1970-01-01'), GETDATE()),
(20307, 24904, N'HS_202512284950100121831', 2.00, 1, 1766915585, DATEADD(SECOND, 1766915585, '1970-01-01'), GETDATE());
GO

SET IDENTITY_INSERT order_items_recovery OFF;
GO

-- ============================================================
-- order_items_send 表无数据需要迁移 (0 条记录)
-- ============================================================

-- 验证迁移后的记录数
SELECT 'order_items_recovery' AS table_name, COUNT(*) AS migrated_count FROM order_items_recovery
UNION ALL
SELECT 'order_items_send' AS table_name, COUNT(*) AS migrated_count FROM order_items_send;
GO
