feat(server): save economy hardening and CH5 continuation work
This commit is contained in:
@@ -1,19 +1,4 @@
|
||||
-- Metin2 64-bit Gold Rollback Script
|
||||
-- Target: player database (player, safebox, guild)
|
||||
-- Restores gold column to INT(11) with clamp to 2,000,000,000 to prevent data truncation errors
|
||||
|
||||
USE `player`;
|
||||
|
||||
-- 1. Clamp values exceeding 2,000,000,000 before downcasting
|
||||
UPDATE `player` SET `gold` = 2000000000 WHERE `gold` > 2000000000;
|
||||
UPDATE `safebox` SET `gold` = 2000000000 WHERE `gold` > 2000000000;
|
||||
UPDATE `guild` SET `gold` = 2000000000 WHERE `gold` > 2000000000;
|
||||
|
||||
-- 2. Restore player.gold to INT(11) NOT NULL DEFAULT 0
|
||||
ALTER TABLE `player` MODIFY COLUMN `gold` INT(11) NOT NULL DEFAULT 0;
|
||||
|
||||
-- 3. Restore safebox.gold to INT(11) NOT NULL DEFAULT 0
|
||||
ALTER TABLE `safebox` MODIFY COLUMN `gold` INT(11) NOT NULL DEFAULT 0;
|
||||
|
||||
-- 4. Restore guild.gold to INT(11) NOT NULL DEFAULT 0
|
||||
ALTER TABLE `guild` MODIFY COLUMN `gold` INT(11) NOT NULL DEFAULT 0;
|
||||
-- Asset-preserving rollback: keep the expanded schema and every balance.
|
||||
-- Deploy a compatible binary that reads/writes BIGINT while disabling new features.
|
||||
-- An automatic downgrade to INT is intentionally prohibited.
|
||||
SELECT 'Keep BIGINT balances; use the compatible rollback binary' AS rollback_policy;
|
||||
|
||||
Reference in New Issue
Block a user