feat: 레거시 DB 순차 증분 이관 CLI 추가

This commit is contained in:
2026-08-18 12:35:24 +00:00
parent e910a635e6
commit da0e32f422
21 changed files with 1375 additions and 104 deletions
@@ -0,0 +1,38 @@
USE root_legacy;
UPDATE `member` SET `REG_NUM` = 1 WHERE `NO` = 1;
UPDATE `system` SET `NOTICE` = 'incremental notice', `MDF_DATE` = '2020-02-01 00:00:00' WHERE `NO` = 1;
UPDATE `storage` SET `value` = '{"version":2}' WHERE `id` = 1;
INSERT INTO `member_log` (`id`, `member_no`, `date`, `action_type`, `action`)
VALUES (2, 1, '2020-02-01 00:00:00', 'logout', NULL);
USE che_legacy;
UPDATE `ng_games` SET `winner_nation` = 1 WHERE `id` = 1;
UPDATE `storage` SET `value` = '[20,null]' WHERE `id` = 1;
INSERT INTO `hall`
(`id`, `server_id`, `season`, `scenario`, `general_no`, `type`, `value`, `owner`, `aux`)
VALUES (2, 'che_fixture_002', 2, 2, 11, 'war', 200, 1, '{}');
INSERT INTO `ng_old_generals`
(`id`, `server_id`, `general_no`, `owner`, `name`, `last_yearmonth`, `turntime`, `data`)
VALUES
(2, 'che_fixture_002', 11, 1, 'Incremental General', 22112, '2020-02-01 00:00:00.000000',
'{"leader":81,"power":71,"intel":61,"history":"second<br>"}');
INSERT INTO `ng_old_nations` (`id`, `server_id`, `nation`, `data`, `date`)
VALUES (2, 'che_fixture_002', 2, '{}', '2020-02-01 00:00:00');
INSERT INTO `emperior` (`no`, `server_id`, `name`, `history`, `aux`)
VALUES (2, 'che_fixture_002', 'Incremental Emperor', '[]', '{}');
INSERT INTO `inheritance_result` (`id`, `server_id`, `owner`, `general_id`, `year`, `month`, `value`)
VALUES (2, 'che_fixture_002', 1, 11, 221, 12, '{}');
INSERT INTO `user_record` (`id`, `user_id`, `server_id`, `log_type`, `year`, `month`, `date`, `text`)
VALUES (2, 1, 'che_fixture_002', 'history', 221, 12, '2020-02-01 00:00:00', 'incremental history');
INSERT INTO `ng_history`
(`no`, `server_id`, `year`, `month`, `map`, `global_history`, `global_action`, `nations`)
VALUES (2, 'che_fixture_002', 221, 12, '{}', '[]', '[]', '[]');
@@ -0,0 +1,56 @@
USE root_legacy;
INSERT INTO `system` (`NO`, `REG`, `LOGIN`, `NOTICE`, `CRT_DATE`, `MDF_DATE`)
VALUES (1, 'Y', 'Y', 'initial notice', '2020-01-01 00:00:00', '2020-01-01 00:00:00');
INSERT INTO `member`
(`NO`, `oauth_id`, `ID`, `EMAIL`, `oauth_type`, `oauth_info`, `token_valid_until`, `PW`, `salt`,
`third_use`, `NAME`, `PICTURE`, `IMGSVR`, `acl`, `penalty`, `GRADE`, `REG_NUM`, `REG_DATE`,
`BLOCK_NUM`, `BLOCK_DATE`, `delete_after`)
VALUES
(1, NULL, 'fixture-user', 'fixture@example.test', 'NONE', '{}', NULL,
REPEAT('a', 128), 'fixture-salt-001', 0, 'Fixture User', 'default.jpg', 0, '{}', '{}', 1, 0,
'2020-01-01 00:00:00', 0, NULL, NULL);
INSERT INTO `member_log` (`id`, `member_no`, `date`, `action_type`, `action`)
VALUES (1, 1, '2020-01-01 00:00:00', 'login', NULL);
INSERT INTO `storage` (`id`, `namespace`, `key`, `value`)
VALUES (1, 'fixture', 'mutable', '{"version":1}');
USE che_legacy;
INSERT INTO `ng_games`
(`id`, `server_id`, `date`, `winner_nation`, `map`, `season`, `scenario`, `scenario_name`, `env`)
VALUES
(1, 'che_fixture_001', '2020-01-01 00:00:00', NULL, 'che', 1, 2, 'fixture',
'{"opentime":"2020-01-01 00:00:00"}');
INSERT INTO `hall`
(`id`, `server_id`, `season`, `scenario`, `general_no`, `type`, `value`, `owner`, `aux`)
VALUES (1, 'che_fixture_001', 1, 2, 10, 'war', 100, 1, '{}');
INSERT INTO `ng_old_generals`
(`id`, `server_id`, `general_no`, `owner`, `name`, `last_yearmonth`, `turntime`, `data`)
VALUES
(1, 'che_fixture_001', 10, 1, 'Fixture General', 22012, '2020-01-01 00:00:00.000000',
'{"leader":80,"power":70,"intel":60,"history":"first<br>"}');
INSERT INTO `ng_old_nations` (`id`, `server_id`, `nation`, `data`, `date`)
VALUES (1, 'che_fixture_001', 1, '{}', '2020-01-01 00:00:00');
INSERT INTO `emperior` (`no`, `server_id`, `name`, `history`, `aux`)
VALUES (1, 'che_fixture_001', 'Fixture Emperor', '[]', '{}');
INSERT INTO `inheritance_result` (`id`, `server_id`, `owner`, `general_id`, `year`, `month`, `value`)
VALUES (1, 'che_fixture_001', 1, 10, 220, 12, '{}');
INSERT INTO `user_record` (`id`, `user_id`, `server_id`, `log_type`, `year`, `month`, `date`, `text`)
VALUES (1, 1, 'che_fixture_001', 'history', 220, 12, '2020-01-01 00:00:00', 'fixture history');
INSERT INTO `storage` (`id`, `namespace`, `key`, `value`)
VALUES (1, 'inheritance_1', 'point', '[10,null]');
INSERT INTO `ng_history`
(`no`, `server_id`, `year`, `month`, `map`, `global_history`, `global_action`, `nations`)
VALUES (1, 'che_fixture_001', 220, 12, '{}', '[]', '[]', '[]');